private void Start() { leftBallScript = FindObjectOfType <LeftBall>(); ballHolder = GetComponentInParent <BallHolder>(); finishedMoving = true; inMidTrigger = false; }
//void OnMouseDown() //{ // if(m_state != BallState.Free) // { // Debug.Log("HIT"); // m_selected = true; // } //} public void Release() { if (m_holder) { m_holder = null; gameObject.transform.SetParent(null); Audio.AUDIO.PlayClip(Audio.AUDIO.m_unequip); } if (m_state == BallState.InUse) { m_state = BallState.Held; if (m_type == PowerType.Core) { gameObject.transform.parent = m_player.PowerPanel.CoreTether.transform; } else if (m_type == PowerType.Ability) { gameObject.transform.parent = m_player.PowerPanel.AbilityTether.transform; } else { gameObject.transform.parent = m_player.gameObject.transform; } } }
public void Power(BallHolder ballHolder) { if (m_state == BallState.Held) { m_holder = ballHolder; m_state = BallState.InUse; gameObject.transform.SetParent(m_holder.transform); Audio.AUDIO.PlayClip(Audio.AUDIO.m_equip); } }
private void Start() { ballHolder = FindObjectOfType <BallHolder>(); StartCoroutine(ShowFirstBall()); AllowShot = true; }