private void BattleAwake() { Assert.IsTrue(_killExpTable.Data.Count == MaxLevel); Assert.IsTrue(_killGoldTable.Data.Count == MaxLevel); Assert.IsTrue(_hpTable.Data.Count == MaxLevel); Assert.IsTrue(_expTable.Data.Count == MaxLevel); Teammates = new List <Player>(); Status = new PlayerStatus(_jobStatus); PlayerInfo = new PlayerInfo(this); FixSpd = new ReactiveCollection <FixSpd>(); Hp = new Hp(HpTable[0]); Exp = new Exp(ExpTable[0]); Level = new Level(1, MaxLevel); Gold = new Gold(0, MaxGold); KillCount = new ReactiveProperty <int>(0); DeathCount = new ReactiveProperty <int>(0); Core = new Core(this); Core.Register(CoreType.Speed, _speedCoreInfo, _speedCoreEffect); Core.Register(CoreType.Hp, _hpCoreInfo, _hpCoreEffect); Core.Register(CoreType.Attack, _attackCoreInfo, _attackCoreEffect); Core.Register(CoreType.Critical, _criticalCoreInfo, _criticalCoreEffect); Core.Register(CoreType.Heal, _healCoreInfo, _healCoreEffect); Movement = new PlayerMovement(this, Core); Movement.SetMaxFallVelocity(-11.0f); DamageReactor = new DamageReactor(this); }
void Awake() { Movement = new EnemyMovement(); Movement.SetMoveForce(Spd); Movement.SetJumpForce(400.0f); State = new CharacterState(); StateTransfer = new StateTransfer(_initState, _animator); Hp = new Hp(_enemyData.Hp); Debuff = new Debuff(transform); Debuff.Register(DebuffType.Stun, _stunEffect); Debuff.Register(DebuffType.Heavy, _heavyEffect); Debuff.Register(DebuffType.Slow, _slowEffect); Debuff.Register(DebuffType.Slip, _slipEffect); Debuff.Register(DebuffType.Ice, _iceEffect); FixSpd = new ReactiveCollection <FixSpd>(); Location = (IEnemyLocation) new Location(this); Location.InitializeFoot(_footCollider); DamageReactor = new DamageReactor(this); DamageReactor.SetSlot(new LevelResistance(_level)); Character = new Character2D(this); }