Esempio n. 1
0
        public static Monster Create(Entity domain, long id)
        {
            var monster = EntityFactory.CreateWithId <Monster>(domain, id);

            monster.BodyView = GameObject.Instantiate(PrefabHelper.GetUnitPrefab("Monster"));
            GameObject.DontDestroyOnLoad(monster.BodyView);
            return(monster);
        }
Esempio n. 2
0
        public static Unit Create(Entity domain, long id)
        {
            var go = UnityEngine.Object.Instantiate(PrefabHelper.GetUnitPrefab("OtherCharacter"));

            GameObject.DontDestroyOnLoad(go);
            var unit = EntityFactory.CreateWithId <Unit>(domain, id);

            unit.Awake(go);
            UnitComponent.Instance.Add(unit);
            return(unit);
        }