private void Start() { OnCurrentGameStateChange = new EventOnDataChange2 <GameState>(); OnMatchTimeLeftChange = new EventOnDataChange <float>(); CurrentGameState = GameState.MainMenu; }
public void Initialize(int id) { PlayerID = id; OnHpChange = new EventOnDataChange2 <int>(); OnMagazineUpdate = new EventOnDataChange1 <int>(); }
private void Awake() { if (!Singleton) { Singleton = this; DontDestroyOnLoad(gameObject); OnCurrentGameStateChange = new EventOnDataChange2 <GameState>(); } else if (this != Singleton) { Destroy(gameObject); } }
private Player(int id, int maxHp, int power, int dexterity, int wisdom) { this.id = id; talents.Add(AttributeType.WalkSpeed_c0, 0.8f); talents.Add(AttributeType.JumpPower_c0, 150); talents.Add(AttributeType.MaxHp_c0, 10); talents.Add(AttributeType.CriticalChance_cp0, 0.05f); talents.Add(AttributeType.CriticalDamage_cp0, 1.5f); talents.Add(AttributeType.BaseDamage_cp0, 1); talents.Add(AttributeType.AttackSpeed_cp0, 1); inventory = new Inventory(); inventory.Add(1, 1); inventory.Add(2, 1); inventory.Add(3, 1); stats = new StatisticSystem(talents, inventory); stats[StatisticType.Hp] = stats[StatisticType.MaxHp]; stats.onStatisticChange.AddListener(DispatchStatisticChangeEvents); OnWalkSpeedChange = new EventOnDataChange2 <float>(); OnJumpPowerChange = new EventOnDataChange2 <float>(); OnHpChange = new EventOnDataChange2 <float>(); OnCriticalChanceChange = new EventOnDataChange2 <float>(); OnCriticalDamageChange = new EventOnDataChange2 <float>(); OnBaseDamageChange = new EventOnDataChange2 <float>(); OnAttackSpeedChange = new EventOnDataChange2 <float>(); playerClass = 0; level = 1; exp = 0; neededExp = 100; this.maxHp = maxHp; this.power = power; this.dexterity = dexterity; this.wisdom = wisdom; OnLevelChange = new EventOnDataChange1 <int>(); OnExpChange = new EventOnDataChange2 <int>(); OnNeededExpChange = new EventOnDataChange1 <int>(); OnPromotionChange = new EventOnDataChange1 <int>(); OnPowerChange = new EventOnDataChange1 <int>(); OnDexterityChange = new EventOnDataChange1 <int>(); OnWisdomChange = new EventOnDataChange1 <int>(); }
private Player(int id, int maxHp, int power, int dexterity, int wisdom) { this.id = id; playerClass = 0; level = 1; exp = 0; neededExp = 100; this.maxHp = maxHp; this.power = power; this.dexterity = dexterity; this.wisdom = wisdom; OnLevelChange = new EventOnDataChange1 <int>(); OnExpChange = new EventOnDataChange2 <int>(); OnNeededExpChange = new EventOnDataChange1 <int>(); OnPromotionChange = new EventOnDataChange1 <int>(); OnMaxHpChange = new EventOnDataChange1 <int>(); OnPowerChange = new EventOnDataChange1 <int>(); OnDexterityChange = new EventOnDataChange1 <int>(); OnWisdomChange = new EventOnDataChange1 <int>(); }
public void Initialize(int id) { PlayerID = id; OnHpChange = new EventOnDataChange2 <float>(); }