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>(); }
void Start() { animator = this.GetComponent <Animator>(); actorMovement = this.GetComponent <ActorMovement>(); actorAttack = this.GetComponent <ActorAttack>(); }
void Start() { animator = this.GetComponent<Animator>(); actorMovement = this.GetComponent<ActorMovement>(); actorAttack = this.GetComponent<ActorAttack>(); }