// Use this for initialization void Start() { _fightMenu = FindObjectOfType<FightMenu>(); _fightEnemyManager = FindObjectOfType<FightEnemyManager>(); _fightWorkflow = FindObjectOfType<FightWorkflow>(); _canvas = transform.GetComponentInChildren<Canvas>().gameObject; _backdrop = GameObject.Find("Backdrop").gameObject; _moveDetailGameObject = Resources.Load<GameObject>("Prefabs/Battle/MoveDetailChoice"); ShowChoices(new List<PlayerFightDetailItem> { new PlayerFightDetailItem { Name = "First", Cost = "1", IconPath = "Battle/MenuIcon/Battle-Flap" }, new PlayerFightDetailItem { Name = "Second", Cost = "1", IconPath = "Battle/MenuIcon/Battle-Peach" }, new PlayerFightDetailItem { Name = "Third", Cost = "1", IconPath = "Battle/MenuIcon/Battle-Peck" } }); Disable(); }
public void Start() { _fightMenuDetail = FindObjectOfType<FightMenuDetail>(); _fightWorkflow = FindObjectOfType<FightWorkflow>(); _spawnStart = GameObject.Find("EnemySpawnStart").gameObject; _fightMenu = FindObjectOfType<FightMenu>(); _player = GameObject.Find("BirdSprite"); var prefab = Resources.Load<GameObject>("Prefabs/Battle/SelectionArrow"); _selectionArrow = Instantiate(prefab); _selectionArrow.name = "Enemy-Select-Arrow"; Enemies = new List<GameObject>(); var crabEnemy = new EnemyType { Id = "Crab", Name = "Crab", Defense = 0, Health = 2, PrefabPath = "Prefabs/Battle/CrabPinch" }; var birdEnemy = new EnemyType { Id = "RedBird", Name = "RedBird", Defense = 0, Health = 2, PrefabPath = "Prefabs/Battle/RedBird" }; var enemiesToSpawn = new List<EnemyType>(); enemiesToSpawn.Add(crabEnemy); enemiesToSpawn.Add(crabEnemy); enemiesToSpawn.Add(birdEnemy); InitEnemies(_spawnStart.transform.position, enemiesToSpawn); DisableEnemySelect(); }
void Start() { fightMenu = FindObjectOfType <FightMenu>(); fightMenuFrame = FindObjectOfType <FightMenuFrame>(); }
// Play intro // Set up player, enemies //- Show player menu // Moves (image, description) // MoveDetails (image, name, description) // Target (enemy list, validate against which types are attackable) // Animation (target, which move) //- Enemy Animation (for each enemy) // Pick what to do // Do Animation // Outro // PlayerFightWorkflow // void Start() { Player = GameObject.Find("BirdSprite"); _fightMenu = FindObjectOfType<FightMenu>(); _fightEnemyManager = FindObjectOfType<FightEnemyManager>(); }