private void Start() { if (IsAI == false) { PlayersDict.Instance.Register(this); } EntityMaterialManager.PlaySpawnEffect(); }
/// <summary> /// Inits the Enemy. /// </summary> /// <param name="enemyObject">The enemy object.</param> /// <param name="roomBorder">The border of the room the enemy spawned in.</param> public void Set(EnemyObject enemyObject, Rect roomBorder) { if (IsBoss == false) { EntityMaterialManager.PlaySpawnEffect(); } Brain.tree = enemyObject.BehaviourTree; carryingWeapons = enemyObject.Weapons; EquippedWeapon.Swap(enemyObject.Weapons[0]); Brain.BrainMover.meterPerSecond = enemyObject.Stats.metersPerSecond; Brain.BrainMover.RoomBounds = roomBorder; Health.Init(enemyObject.Stats.maxHealth); entityName = enemyObject.name; }