public void CreateOnPlanetDestruction(int count, Vector3 originPos) { for (int i = 0; i < count; ++i) { Common.StaticData.EntityInfo entityInfo = StaticInfoManager.Instance.EntityInfos[OriginEntityId]; Dust target = EntityManager.Instance.Create <Dust>(entityInfo); target.SetParameter(originPos, new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f))); } }
IEnumerator CreateHoming() { interval = new WaitForSeconds(createInterval); while (true) { Common.StaticData.EntityInfo entityInfo = StaticInfoManager.Instance.EntityInfos[OriginEntityId]; Dust target = EntityManager.Instance.Create <Dust>(entityInfo); target.SetParameter(transform.position, homingTarget.position - transform.position); yield return(interval); } }
IEnumerator CreateFountain() { interval = new WaitForSeconds(createInterval); while (true) { Common.StaticData.EntityInfo entityInfo = StaticInfoManager.Instance.EntityInfos[OriginEntityId]; Dust target = EntityManager.Instance.Create <Dust>(entityInfo); target.SetParameter(transform.position, new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f))); yield return(interval); } }