Exemplo n.º 1
0
        IEnumerator CheckCreatedManually()
        {
            yield return(new WaitForSeconds(2f));

            if (CreatedManually)
            {
                _moveByPath.SetPath("Path0");
                // AddOrder(mbp, CurrentOrder == null);
            }
        }
Exemplo n.º 2
0
        void SpawnMob(GameObject mobPrefab, string pathName)
        {
            var path = paths.Find(e => e.gameObject.name == pathName);
            Mob mob  = SimplePool.Spawn(mobPrefab,
                                        path.FirstSegment, transform.rotation).GetComponent <Mob>();
            //				mob.transform.position += new Vector3(i % 2 == 0 ? WaveControl.RangeBetweenMobsInGroup.x*i : 0,
            //					i % 2 == 0 ? WaveControl.RangeBetweenMobsInGroup.y*i : 0, 0);

            MoveByPath mbp = mob.GetComponent <MoveByPath>();

            mbp.SetPath(pathName);

            MobSpawnedEvent?.Invoke(mob, this);
        }