예제 #1
0
 void Start()
 {
     player      = GetComponentInParent <KTB_Player>();
     inputs      = GetComponentInParent <KTB_PlayerInput>();
     area        = GetComponent <CircleCollider2D>();
     gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>();
     crosshair   = GetComponent <SpriteRenderer>();
     rb          = GetComponentInParent <Rigidbody2D>();
 }
예제 #2
0
 void Awake()
 {
     if (instance == null && instance != this)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
예제 #3
0
 void Start()
 {
     gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>();
 }
예제 #4
0
 public override void Start()
 {
     base.Start();
     playerKTB   = (PlayerKTB)player;
     gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <KeepTheBroom>();
 }