Пример #1
0
 public void DisableLine()
 {
     if (lineUpdate)
     {
         lineUpdate.DisableLine();
     }
 }
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        this.animator = animator;
        state         = animator.GetComponentInChildren <TurretState> ();
        sp            = animator.GetComponent <TurretSP> ();
        update        = animator.GetComponentInChildren <LineUpdate> ();

        sp.turretSP.SetNone();
        update.DisableLine();
    }
Пример #3
0
    IEnumerator StartExplosionIE()
    {
        // stop the roomba from moving
        if (stopMovement && body)
        {
            body.velocity = Vector3.zero;
        }

        yield return(new WaitForSeconds(explosionDelay));

        if (explosion != null)
        {
            if (lu)
            {
                lu.DisableLine();
            }

            GameObject explosionGO = Instantiate(explosion, transform.position,
                                                 Quaternion.Euler(0f, 0f, 0f), null);
            ParticleLayerSetter setter = explosionGO.GetComponentInChildren <ParticleLayerSetter> ();
            SpriteRenderer      sr     = GetComponent <SpriteRenderer> ();

            if (scaleExplosion)
            {
                explosionGO.transform.localScale = transform.lossyScale;
            }

            explosionGO.transform.parent = explosionParent;

            if (setter && sr)
            {
                setter.SetSortingLayer(sr.sortingLayerID);
            }
        }

        explosionCoroutine = null;
    }
Пример #4
0
 public void DisableLine()
 {
     lu.DisableLine();
 }
 // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
 override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     update.DisableLine();
 }