コード例 #1
0
    private void Awake()
    {
        _actorControl = GetComponent <ActorControl>();

        for (int i = 0; i < _legs.Count; i++)
        {
            _legs[i].SetupOppositeLegs(_legs);
        }

        _isRunning = true;
    }
コード例 #2
0
 void Start()
 {
     deathAnimCheck = gameObject.GetComponent <DeathAnim>();
     if (deathAnimCheck != null)
     {
         anim = gameObject.GetComponent <Animator>();
     }
     if (gameObject.tag == "Player")
     {
         pControl = gameObject.GetComponent <PlayerControl>();
     }
     aControl   = gameObject.GetComponent <ActorControl>();
     currentCol = Color.white;
     sRend      = gameObject.GetComponent <SpriteRenderer>();
     maxHp      = hitPoints;
     if (gameObject.tag == "Player")
     {
         Debug.Log("Max HP: " + maxHp);
         attackControl = gameObject.GetComponent <PlayerBasicAttack>();
         sumControl    = gameObject.GetComponent <CommunistSummon>();
     }
 }
コード例 #3
0
 public ActorControlCommand(Entity target, Entity possessor, ActorControl newControl)
     : base(target)
 {
     this.Target     = possessor;
     this.newControl = newControl;
 }
 private void Initialize()
 {
     _actorControl = GetComponentInParent <ActorControl>();
 }
コード例 #5
0
 private void OnValidate()
 {
     _actorControl = GetComponent <ActorControl>();
 }