public override void Initialize(Vector2Int position, bool isInitializingGame) { base.Initialize(position, isInitializingGame); this.levelParameter = GameSystem.Instance.MasterData.RoadLevelParameter.Records.Get(this.Id, this.Level); this.ApplyBuff(this.levelParameter.AddBuff); this.ObserveAddReceiveBuff(); }
public void LevelUp() { Extensions.Extensions.LevelUp(this); var gameSystem = GameSystem.Instance; // 範囲が広がることを考慮して一旦バフを解除する var oldBuffValue = this.levelParameter.AddBuff; this.ApplyBuff(-this.levelParameter.AddBuff); this.levelParameter = gameSystem.MasterData.RoadLevelParameter.Records.Get(this.Id, this.Level); // 新しいパラメータでバフを付与する this.ApplyBuff(this.levelParameter.AddBuff); }