コード例 #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");
    }
コード例 #2
0
ファイル: Opponent.cs プロジェクト: ATL3Y/Thesis_Curriculum
    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);
    }
コード例 #3
0
 public void SwitchMovement(OpponentState state)
 {
     this.state = state;
     IsRunning  = true;
 }