示例#1
0
 protected new void Awake()
 {
     base.Awake();
     sm = GameObject.FindWithTag("MainCamera").GetComponent<StateMachine>();
     nametag = gameObject.AddComponent<Nametag>();
     pathfinding = gameObject.AddComponent<Pathfinding>();
     d20 = gameObject.AddComponent<D20>();
 }
示例#2
0
 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>();
 }