Exemplo n.º 1
0
        public override void GameElementUpgrade(GameElementBehaviour upgrade_behaviour)
        {
            BehaviourShooter shooter_behaviour = upgrade_behaviour as BehaviourShooter;

            _projectile = shooter_behaviour._projectile;
            _range      = shooter_behaviour._range;
            _frequency  = shooter_behaviour._frequency;
            _target_tag = shooter_behaviour._target_tag;
            _damage     = shooter_behaviour._damage;
        }
        protected override void Awake()
        {
            base.Awake();

            name_string = "Shooter Cart";

            if (projectile != null)
            {
                beh_shooter = new BehaviourShooter(this, projectile, damage, range, frequency, target_tag);
                Behaviours.Add(beh_shooter);
                Behaviours.Add(new BehaviourHealthPoints(this, health));

                //Behaviours.Add (new BehaviourUpgradable(this, upgrade, upgrade_cost));
            }
        }