public void AddEnemyToBattle(RPGCharacter ch) { UnityEngine.Assertions.Assert.AreEqual(ch.GetCamp(), EnumCharacterCamp.Enemy); RPGEnemy player = ch as RPGEnemy; enemies.Enemies.Add(player); }
public void SetEnemy(RPGEnemy e) { if (transform.childCount > 0) { transform.DetachChildren(); } _enemy = e; e.transform.parent = transform; SceneManager.LoadScene(0); }
public static RPGEnemy Create(int id, CharacterAttribute customAttribute = null) { EnemyDef def = ResourceManager.GetEnemyDef(id); RPGEnemy r = new RPGEnemy(def); if (customAttribute != null) { r.logic.SetAttribute(customAttribute); } return(r); }
public void PreloadArena(List<PhotonPlayer> admissionPlayers, int enemyID, int newOwnerID, int newViewID ) { arenaState = ArenaState.waitingForPlayersToLoad; Debug.Log("preloading Arena data"); admittedPlayers = admissionPlayers; rpgEnemy = Storage.LoadById<RPGEnemy>(enemyID, new RPGEnemy()); ownerViewID = newViewID; ownerID = newOwnerID; SpawnEnemyWave(0); //instantiate enemy }
public override void OnEnter() { if (UseDefaultAttribute) { Attribute = null; } if (Camp == EnumCharacterCamp.Player) { RPGCharacter ch = RPGPlayer.Create(ID, Attribute); gameMode.BattlePlayer.AddUnitToMap(ch, Coord); } if (Camp == EnumCharacterCamp.Enemy) { RPGCharacter ch = RPGEnemy.Create(ID, Attribute); gameMode.BattlePlayer.AddUnitToMap(ch, Coord); } Continue(); }
protected override void StartNewIItem() { currentItem = new RPGEnemy(); }
public static RPGEnemy Create(CharacterInfo info) { RPGEnemy r = new RPGEnemy(info); return(r); }
void Start () { _battle = FindObjectOfType<RPGBattle>(); _player = _battle._player; _enemy = _battle._enemy; }
public void NetworkCleanUp() { Debug.Log("clean up arena"); for (int i = 0; i < enemyFSMs.Count; i++) { Destroy(enemyFSMs[i].gameObject); } rpgEnemy = null; ownerID = 0; ownerViewID = 0; playerCharacterStatuses.Clear(); photonPlayers.Clear(); admittedPlayers.Clear(); enemyFSMs.Clear(); arenaState = ArenaState.inactive; }