Exemple #1
0
        protected override void Awake()
        {
            base.Awake();

            _collider       = GetComponent <Collider2D>();
            moveByTransform = GetComponentInParent <MoveByTransform>();
            moveByPath      = GetComponentInParent <MoveByPath>();
        }
Exemple #2
0
        protected override void Awake()
        {
            base.Awake();

            _attachments = GetComponent <AttachmentPoints>();
            _attachments.Points.TryGetValue("Foot", out footPoint);
            weapon          = GetComponentInChildren <Weapon>();
            moveByTransform = GetComponent <MoveByTransform>();
        }
Exemple #3
0
        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;
        }