コード例 #1
0
 public void Initialize(int index)
 {
     _UIHealth.Initialize(1.0f);
     _UIStamina.Initialize(1.0f);
     _UIHealthNumber.Initialize(_health);
     _UIStaminaNumber.Initialize(_stamina);
     for (int i = 0; i < _meleeAmount; i++)
     {
         CreateMelee((Melee.Target)(i - 1), _meleeSprites[i], (i - 1) * _meleeOffset);
     }
     CreateNoMelee(_meleeAmount * _meleeOffset);
     CreatePotion(_itemOffset, false);
     CreatePotion(_itemOffset, true);
     CreateDisabler(_itemOffset, Debuff.CANNOTHEAD);
     CreateDisabler(_itemOffset, Debuff.CANNOTBODY);
     CreateDisabler(_itemOffset, Debuff.CANNOTLEGS);
     _itemMenu.Initialize(_itemActions);
     Reset();
     _id = index;
     AI  = gameObject.GetComponent <BasicAI>();
     if (AI)
     {
         AI.Initialize(_meleeActions);
     }
 }