コード例 #1
0
ファイル: Unit.cs プロジェクト: ArturToJa/Battlescape
        protected void Start()
        {
            equipment.EquipPrimaryWeapon();
            animator  = GetComponentInChildren <Animator>();
            visuals   = Helper.FindChildWithTag(gameObject, "Body");
            buffs     = new BuffGroup(this);
            modifiers = new List <AbstractAttackModifier>();
            abilities = new List <AbstractAbility>();
            movement  = GetMovementType();
            if (movement == null)
            {
                statistics.NullMaxMovementPoints();
            }

            SetAttackToDefault();
            if (attack == null)
            {
                statistics.NullBaseAttack();
                statistics.NullMaxNumberOfAttacks();
            }
            statistics.healthPoints  = statistics.maxHealthPoints;
            statistics.currentEnergy = Statistics.maxEnergy / 2;
            statistics.currentMaxNumberOfRetaliations = statistics.defaultMaxNumberOfRetaliations;
            FaceMiddleOfMap();
            UpdateAbilities();
        }
コード例 #2
0
 protected new void Start()
 {
     base.Start();
     buffs               = new BuffGroup(this);
     myHealthBar         = GetComponentInChildren <BattlescapeUI.DestructibleObstacleHealthbar>();
     currentHealthPoints = maxHealthPoints;
 }