浏览代码

Small Fixes

/main
Thomas ICHÉ 6 年前
当前提交
fd8e8846
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 5
      Runtime/Factory/Factory.cs
  2. 4
      Runtime/Logic/NextFrameLogic.cs

5
Runtime/Factory/Factory.cs


public BlueprintSelectionMode blueprintSelecionMode = BlueprintSelectionMode.Random;
public bool RespawnTarget = true;
public bool AttachToTarget = true;
public float RespawnDelay = 3.0f;
[Min(1), SerializeField]

if (m_Instances.Count <= MaxInstances)
{
GameObject newInstance = Spawn(SelectBlueprint(), SpawnTarget);
if (AttachToTarget)
newInstance.transform.parent = SpawnTarget.transform;
Callable.Call(OnSpawn, newInstance);
}

4
Runtime/Logic/NextFrameLogic.cs


public class NextFrameLogic : LogicBase
{
[ReorderableList]
public Callable[] OnComplete;
public Callable[] OnNextFrame;
IEnumerator m_Coroutine;
public override void Execute(GameObject instigator = null)

IEnumerator RunDelay(GameObject instigator = null)
{
yield return new WaitForEndOfFrame();
Callable.Call(OnComplete, instigator);
Callable.Call(OnNextFrame, instigator);
m_Coroutine = null;
}
}
正在加载...
取消
保存