protected override void Awake() { base.Awake(); _collider = GetComponent <Collider2D>(); moveByTransform = GetComponentInParent <MoveByTransform>(); moveByPath = GetComponentInParent <MoveByPath>(); }
protected override void Awake() { base.Awake(); _attachments = GetComponent <AttachmentPoints>(); _attachments.Points.TryGetValue("Foot", out footPoint); weapon = GetComponentInChildren <Weapon>(); moveByTransform = GetComponent <MoveByTransform>(); }
void LoadData() { _healthy.SetMaxHealth(StatsData.Hp); MobWeapon weapon = GetComponentInChildren <MobWeapon>(); weapon.DamageMin = StatsData.DamageMin; weapon.DamageMax = StatsData.DamageMax; weapon.AttackInterval = StatsData.AttackRate; _healthy.ArmorType = StatsData.Armor; _moveByPath.Speed = (float)StatsData.Speed; MoveByTransform mbt = GetComponent <MoveByTransform>(); mbt.Speed = (float)StatsData.Speed; FoodReward = StatsData.FoodReward; }