Esempio n. 1
0
 void Awake()
 {
     controller     = GetComponent <Controller2D>();
     animator       = GetComponentInChildren <Animator>();
     spriteRenderer = GetComponentInChildren <SpriteRenderer>();
     coll           = GetComponent <BoxCollider2D>();
     wd             = GetComponent <WallDetection>();
     tileGrid       = GameObject.FindGameObjectWithTag("Tile Grid").GetComponent <Grid>();
     cd             = GetComponent <CornerDetection>();
 }
Esempio n. 2
0
 void Start()
 {
     wdetecdtor      = GameObject.Find("WallDetector");
     wdetector2      = GameObject.Find("WallDetector2");
     GroundDetector  = GameObject.Find("GroundDetector");
     LiftUpDetector  = GameObject.Find("LiftUpDetector");
     LandingDetector = GameObject.Find("LandingDetector");
     fScript         = wdetecdtor.GetComponent <WallDetection>();
     fScript2        = wdetector2.GetComponent <WallDetection2>();
     gScript         = GroundDetector.GetComponent <GroundDetection>();
     lScript         = LiftUpDetector.GetComponent <LiftUpDetection>();
     landingScript   = LandingDetector.GetComponent <LandingDetection>();
     dude            = gameObject.GetComponent <Rigidbody2D>();
     anim            = gameObject.GetComponent <Animator>();
 }