protected new void Awake() { base.Awake(); sm = GameObject.FindWithTag("MainCamera").GetComponent<StateMachine>(); nametag = gameObject.AddComponent<Nametag>(); pathfinding = gameObject.AddComponent<Pathfinding>(); d20 = gameObject.AddComponent<D20>(); }
protected void Start() { sm = GameObject.FindWithTag("MainCamera").GetComponent<StateMachine>(); d20 = GetComponent<D20>(); rb2d = GetComponent<Rigidbody2D>(); bc2d = GetComponent<BoxCollider2D>(); cc2d = GetComponent<CircleCollider2D>(); p = GetComponent<Pathfinding>(); e = GetComponent<Entity>(); i = e.getInventory(); hitter = GetComponent<Animator>(); }