public void OnSelect(BaseEventData eventData) { currentlySelected.Add(this); if (this.name == "Boy") { BetterPlayer_Movement movBoy = this.GetComponent <BetterPlayer_Movement>(); if (movBoy.IsCombat == true) { movBoy.BoyActive = true; movBoy.SelectedParticleBoy(); } } if (this.name == "Girl") { BetterPlayer_Movement movGirl = this.GetComponent <BetterPlayer_Movement>(); if (movGirl.IsCombat == true) { movGirl.BoyActive = false; movGirl.SelectedParticleGirl(); } } }
public void OnDeselect(BaseEventData eventData) { if (this.name == "Boy") { BetterPlayer_Movement movBoy = this.GetComponent <BetterPlayer_Movement>(); BetterPlayer_Movement movGirl = this.GetComponent <BetterPlayer_Movement>(); movBoy.SwapGirl(); movGirl.SwapGirl(); } if (this.name == "Girl") { BetterPlayer_Movement movBoy = this.GetComponent <BetterPlayer_Movement>(); BetterPlayer_Movement movGirl = this.GetComponent <BetterPlayer_Movement>(); movBoy.SwapBoy(); movGirl.SwapBoy(); } }
private void Start() { Boy = publicVariableHolder._BoyMovementScript; Girl = publicVariableHolder._GirlMovementScript; }
private void Awake() { playerMovement = GetComponent <BetterPlayer_Movement>(); }
// when this stuff gets enabled, no gameplay is allowed as of right now //private void Awake() //{ // List<GameObject> neverUnloadRootObjects = new List<GameObject>(); // Scene neverUnload = SceneManager.GetSceneByName("NeverUnload"); // neverUnload.GetRootGameObjects(neverUnloadRootObjects); // // spell button objects // BigSpellW.SetActive(true); // BigSpellQ.SetActive(true); // SmallSpellW.SetActive(true); // SmallSpellQ.SetActive(true); // // enemy objects // currentEnemy.SetActive(true); // EnemyUI.SetActive(true); // // find game objects // BigSpellW = GameObject.Find("BigSpellW"); // BigSpellQ = GameObject.Find("BigSpellQ"); // SmallSpellW = GameObject.Find("SmallSpellW"); // SmallSpellQ = GameObject.Find("SmallSpellQ"); // currentEnemy = GameObject.Find("currentEnemy"); // EnemyUI = GameObject.Find("EnemyUI"); //} //TODO Alex changement for Keegan : change function from Start to Awake private void Awake() { List <GameObject> neverUnloadRootObjects = new List <GameObject>(); Scene neverUnload = SceneManager.GetSceneByName("NeverUnload"); neverUnload.GetRootGameObjects(neverUnloadRootObjects); //// enemy objects //currentEnemy.SetActive(true); //EnemyUI.SetActive(true); //// find game objects ///TODO Alex changements for Keegan, I completed the Find() function. BigSpellW = GameObject.Find("PlayerUI/BigUI/BigSpellSlotW"); BigSpellQ = GameObject.Find("PlayerUI/BigUI/BigSpellSlotQ"); SmallSpellW = GameObject.Find("PlayerUI/SmallUI/SmallSpellSlotW"); SmallSpellQ = GameObject.Find("PlayerUI/SmallUI/SmallSpellSlotQ"); // spell button objects //BigSpellW.SetActive(true); //BigSpellQ.SetActive(true); //SmallSpellW.SetActive(true); //SmallSpellQ.SetActive(true); //currentEnemy = GameObject.Find("currentEnemy"); //EnemyUI = GameObject.Find("EnemyUI"); _BigTextHP = _PublicVariableHolder._BigTextHP; _SmallTextHP = _PublicVariableHolder._SmallTextHP; /* * _BigSpellQ = _PublicVariableHolder._BigSpellQ; * _BigSpellW = _PublicVariableHolder._BigSpellW; * _SmallSpellQ = _PublicVariableHolder._SmallSpellQ; * _SmallSpellW = _PublicVariableHolder._SmallSpellW; */ _HealImage = _PublicVariableHolder._HealImage; _ExplosionImage = _PublicVariableHolder._ExplosionImage; _ShieldImage = _PublicVariableHolder._ShieldImage; _StunImage = _PublicVariableHolder._StunImage; _BigPicture = _PublicVariableHolder._BigPicture; _SmallPicture = _PublicVariableHolder._SmallPicture; _BoySprite = _PublicVariableHolder._BoySprite; _GirlSprite = _PublicVariableHolder._GirlSprite; _SmallSlider = _PublicVariableHolder._SmallSlider; _BigSlider = _PublicVariableHolder._BigSlider; _GirlHealthUI = _PublicVariableHolder._GirlHealthUI; _BoyHealthUI = _PublicVariableHolder._BoyHealthUI; _GirlSpellCommandScript = _PublicVariableHolder._GirlSpellCommandScript; _BoySpellCommandScript = _PublicVariableHolder._BoySpellCommandScript; _BigQCooldowntext = _PublicVariableHolder._BigQCooldowntext; _BigWCooldowntext = _PublicVariableHolder._BigWCooldowntext; _SmallQCooldowntext = _PublicVariableHolder._SmallQCooldowntext; _SmallWCooldowntext = _PublicVariableHolder._SmallWCooldowntext; _CooldownBigQImage = _PublicVariableHolder._CooldownBigQImage; _CooldownBigWImage = _PublicVariableHolder._CooldownBigWImage; _CooldownSmallQImage = _PublicVariableHolder._CooldownSmallQImage; _CooldownSmallWImage = _PublicVariableHolder._CooldownSmallWImage; _GirlMovementScript = _PublicVariableHolder._GirlMovementScript; _BoyMovementScript = _PublicVariableHolder._BoyMovementScript; EnemyUI = _PublicVariableHolder.EnemyUI; EnemyNameUI = _PublicVariableHolder.EnemyNameUI; CurrentEnemyHPUI = _PublicVariableHolder.CurrentEnemyHPUI; SliderEnemyHPUI = _PublicVariableHolder.SliderEnemyHPUI; BigSpellQ = _PublicVariableHolder.BigSpellQ; BigSpellW = _PublicVariableHolder.BigSpellW; SmallSpellQ = _PublicVariableHolder.SmallSpellQ; SmallSpellW = _PublicVariableHolder.SmallSpellW; }
// Use this for initialization void Start() { m_player = GetComponent <BetterPlayer_Movement>(); }