public void SetPrivates() { _characterBhv = GetComponent <CharacterBhv>(); _opponentBhv = _characterBhv.OpponentBhvs[0]; _gridBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <GridBhv>(); _fightSceneBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <FightSceneBhv>(); }
public override void SetPrivates() { base.SetPrivates(); _fightSceneBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <FightSceneBhv>(); _gridBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <GridBhv>(); _soundControler = GameObject.Find(Constants.TagSoundControler).GetComponent <SoundControlerBhv>(); _isStretching = false; _resetedScale = new Vector3(1.0f, 1.0f, 1.0f); _pressedScale = new Vector3(1.1f, 1.1f, 1.0f); _onSprite = transform.Find("OnSprite").GetComponent <SpriteRenderer>(); _offSprite = transform.Find("OffSprite").GetComponent <SpriteRenderer>(); _overSprite = transform.Find("OverSprite").GetComponent <SpriteRenderer>(); SetStartVisuals(); }
public void SetPrivates() { _fightSceneBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <FightSceneBhv>(); _gridBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <GridBhv>(); OpponentBhvs = new List <CharacterBhv>(); if (Character.IsPlayer) { int nbOpponents = PlayerPrefs.GetInt(Constants.PpNbOpponents); for (int i = 0; i < nbOpponents; ++i) { OpponentBhvs.Add(GameObject.Find(Constants.GoOpponentName + i).GetComponent <CharacterBhv>()); } } else { OpponentBhvs.Add(GameObject.Find(Constants.GoPlayerName).GetComponent <CharacterBhv>()); Ai = gameObject.AddComponent <AiBhv>(); Ai.SetPrivates(); } Instantiator = _fightSceneBhv.Instantiator; SkinContainer = transform.Find("SkinContainer").GetComponent <SkinContainerBhv>(); for (int i = 0; i < Character.Skills.Count; ++i) { if (Character.Skills[i] != null) { Character.Skills[i].Init(this, OpponentBhvs, _gridBhv, i); } } if (Character.IsPlayer) { _orbPa = GameObject.Find("Pa")?.GetComponent <OrbBhv>(); _orbPm = GameObject.Find("Pm")?.GetComponent <OrbBhv>(); } Pa = Character.PaMax; Pm = Character.PmMax; }
public void SetPrivates() { _grid = GameObject.Find("Grid").GetComponent <Grid>(); _fightSceneBhv = GameObject.Find(Constants.GoSceneBhvName).GetComponent <FightSceneBhv>(); }