Beispiel #1
0
 public LietoResurrect(DetectCheckpoint detectCheckpoint, CharacterMotor motor,
                       CameraFollow follow, LietoResurrectSignal resurrectSignal, Life life, Switch _switch, BossFightStartSignal bossStartSignal) : base(resurrectSignal, motor, life)
 {
     _detectCheckpoint = detectCheckpoint;
     _cameraFollow     = follow;
     _life             = life;
     this._switch      = _switch;
     _bossStartSignal  = bossStartSignal;
 }
Beispiel #2
0
        public override void Initialize()
        {
            base.Initialize();

            _detectCheckpoint.OnDetect += (other) =>
            {
                _ressurectPosition = other.transform.localPosition;
            };

            _bossStartSignal += () =>
            {
                _ressurectPosition = _motor.Position;
            };
        }
Beispiel #3
0
        public void Initialize()
        {
            _stateMachine.AddState(State.NonAct);
            _stateMachine.AddState(State.Waiting);
            _stateMachine.AddState(State.Idle, enterIdle, null, leaveIdle);
            _stateMachine.AddState(State.Attacking, enterAttack, null, leaveAttack);

            _stateMachine.CurrentState = State.NonAct;

            _bossFightStartSignal += bossFightStart;

            _resurrectSignal += onResurrect;
            _deathSignal     += onDeath;

            _life.OnDead += onDead;

            UnityEngine.Random.InitState(9999);
        }