Esempio n. 1
0
    void Awake()
    {
        Rigid       = GetComponent <Rigidbody2D>();
        Instance    = GetComponent <ActorInstance>();
        ActorAttack = GetComponent <ActorAttack>();

        if (Rigid == null)
        {
            Rigid = this.gameObject.AddComponent <Rigidbody2D>();
            Rigid.freezeRotation = true;
        }

        Collider         = GetComponent <BoxCollider2D>();
        Collider.enabled = true;

        Anim = transform.Find("Body").GetComponent <Animator>();
    }
Esempio n. 2
0
 void Start()
 {
     animator      = this.GetComponent <Animator>();
     actorMovement = this.GetComponent <ActorMovement>();
     actorAttack   = this.GetComponent <ActorAttack>();
 }
Esempio n. 3
0
 void Start()
 {
     animator = this.GetComponent<Animator>();
     actorMovement = this.GetComponent<ActorMovement>();
     actorAttack = this.GetComponent<ActorAttack>();
 }