public void changeDicrption(int index) { // Class Name string[] names = new string[] { "Rocket", "Inventor", "Sniper", "Rogue" }; PlayerCast disc = spawnPrefabs[index].GetComponent <PlayerCast>(); if (disc != null) { // Change Ability Info Text Text[] infoText = abilityInfo.GetComponentsInChildren <Text>(); infoText[0].text = names[index]; int temp = 0; foreach (Text t in infoText) { if (t != infoText[0]) { t.text = disc.m_abilities[temp].getToolTipStatInfo(); temp++; } } //Change Btns Image[] abilityimage = abilityBtns.GetComponentsInChildren <Image>(); foreach (Image i in abilityimage) { i.overrideSprite = disc.m_abilities[index].m_abilityIcon; } } }
private void Start() { m_pSetup = GetComponent <PlayerSetup>(); m_pMovement = GetComponent <PlayerMovement>(); m_pCast = GetComponent <PlayerCast>(); m_pHealth = GetComponent <PlayerHealth>(); }
// Start is called before the first frame update void Start() { PlayerCamera = GameObject.Find("camera").GetComponent <Camera>(); playerT = GameObject.Find("player").transform; dirObjT = GameObject.Find("centerPoint").transform; modelT = GameObject.Find("playerModel").transform; playerCast = GameObject.Find("playerCast").GetComponent <PlayerCast>(); }
private void Start() { cast = GetComponent <PlayerCast>(); }
private void Start() { cast = GetComponent <PlayerCast>(); line.SetPosition(0, startPoint.position); }
public static void UnsubscribeAllSubscriber() { if (NextPhase != null) { System.Delegate[] delegates = NextPhase.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { NextPhase -= delegates [i] as NextPhaseEvent; } } if (AllowCurrentPlayerToMove != null) { System.Delegate[] delegates = AllowCurrentPlayerToMove.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { AllowCurrentPlayerToMove -= delegates [i] as AllowCurrentPlayerToMoveEvent; } } if (DisallowCurrentPlayerToMove != null) { System.Delegate[] delegates = DisallowCurrentPlayerToMove.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { DisallowCurrentPlayerToMove -= delegates [i] as DisallowCurrentPlayerToMoveEvent; } } if (AllowCurrentPlayerToFire != null) { System.Delegate[] delegates = AllowCurrentPlayerToFire.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { AllowCurrentPlayerToFire -= delegates [i] as AllowCurrentPlayerToFireEvent; } } if (DisallowCurrentPlayerToFire != null) { System.Delegate[] delegates = DisallowCurrentPlayerToFire.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { DisallowCurrentPlayerToFire -= delegates [i] as DisallowCurrentPlayerToFireEvent; } } if (NextPlayer != null) { System.Delegate[] delegates = NextPlayer.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { NextPlayer -= delegates [i] as NextPlayerEvent; } } if (PlayerDead != null) { System.Delegate[] delegates = PlayerDead.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { PlayerDead -= delegates [i] as PlayerDeadEvent; } } if (PlayerWon != null) { System.Delegate[] delegates = PlayerWon.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { PlayerWon -= delegates [i] as PlayerWonEvent; } } if (TimerEnd != null) { System.Delegate[] delegates = TimerEnd.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { TimerEnd -= delegates [i] as TimerEndEvent; } } if (PlayerCast != null) { System.Delegate[] delegates = PlayerCast.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { PlayerCast -= delegates [i] as PlayerCastEvent; } } if (SpellEnd != null) { System.Delegate[] delegates = SpellEnd.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { SpellEnd -= delegates [i] as SpellEndEvent; } } if (NextPlayerButtonClick != null) { System.Delegate[] delegates = NextPlayerButtonClick.GetInvocationList(); for (int i = 0; i < delegates.Length; i++) { NextPlayerButtonClick -= delegates [i] as NextPlayerButtonClickEvent; } } }
private void Start() { select = GetComponent <PlayerSelect>(); cast = GetComponent <PlayerCast>(); }