Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Merge patch-atomic-mmexenstions-weapons-extended-01-04-2025-1736036435 into dev #3671

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/kbve.com/src/content/journal/01-04.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ tags:
**Abilities**

Healing! A core of the gameplay is what we need to build now!
The issue ticket that we are currently handling is [3651](https://github.com/KBVE/kbve/issues/3651).

- 08:05PM

**Twitch**

While working through the AOE spells, I thought it be cool to work on the twitch stream!

## 2024

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using Cysharp.Threading.Tasks;
using UnityEngine;

public class DelayedDisableSelf : MonoBehaviour
{
public int delayMillis;

// Start is called once before the first execution of Update after the MonoBehaviour is created
void OnEnable()
{
DoAfterSeconds(delayMillis, () => gameObject.SetActive(false));
}

private async UniTask DoAfterSeconds(int millisDelay, Action action)
{
await UniTask.Delay(millisDelay);

action.Invoke();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using Cysharp.Threading.Tasks;
using KBVE.MMExtensions.ObjectPool;
using MoreMountains.Tools;
using UnityEngine;

public class DelayedObjectSpawner : MonoBehaviour
{
public MMObjectPooler objectPool;
public int millisToWait;

// Start is called once before the first execution of Update after the MonoBehaviour is created
void OnEnable()
{
DoAfterSeconds(millisToWait, () => SetupPooledObject(objectPool.GetPooledGameObject()));
}

private async UniTask DoAfterSeconds(int millisDelay, Action action)
{
Debug.Log("a");
await UniTask.Delay(millisDelay);
Debug.Log("b");

action.Invoke();
}

private void SetupPooledObject(GameObject pooledGameObject)
{
pooledGameObject.SetActive(true);
pooledGameObject.transform.position = gameObject.transform.position;
pooledGameObject.transform.rotation = Quaternion.identity;
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading