Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        state     = OpponentState.Stationary;
        IsRunning = true;

        hammer = transform.FindChild("Hammer").GetComponent <HammerAttack>();
        if (hammer != null)
        {
            hammer.ActivateAnimations();
        }
        lineRenderer         = GetComponent <LineRenderer>();
        OpponentHealth.Died += new HealthScript.DeathEventHandler(OpponentHealth_Died);
        turret = gameObject.transform.FindChild("Turret");
    }
Ejemplo n.º 2
0
    protected virtual void OnEnable()
    {
        // If this is just part of GameLord.Instance.InitScenes(), bail.
        if (GameLord.instance.loading != Loading.Loaded)
        {
            return;
        }

        finished = false;
        state    = OpponentState.Untouched;
        timer    = 2.0f;

        // Opponent can be hit on the 0 or 2 beats, which is half the BPM.
        cycleDuration = 60.0f / GameLord.instance.MusicLord.GetBPM( ) / 2.0f;
        cycleCount    = 32.0f;

        fx_hitHand_one.SetActive(false);
        fx_hitHand_two.SetActive(false);
        fx_hitTrigger.SetActive(false);
    }
Ejemplo n.º 3
0
 public void SwitchMovement(OpponentState state)
 {
     this.state = state;
     IsRunning  = true;
 }