Ejemplo n.º 1
0
 private void Start()
 {
     leftBallScript = FindObjectOfType <LeftBall>();
     ballHolder     = GetComponentInParent <BallHolder>();
     finishedMoving = true;
     inMidTrigger   = false;
 }
Ejemplo n.º 2
0
    //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;
            }
        }
    }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 private void Start()
 {
     ballHolder = FindObjectOfType <BallHolder>();
     StartCoroutine(ShowFirstBall());
     AllowShot = true;
 }