Exemplo n.º 1
0
 void Awake()
 {
     headCheck     = transform.Find("HeadCheck");
     groundCheck   = transform.Find("GroundCheck");
     originalSpeed = speed;
     startPosition = transform.position;
     lastX         = startPosition.x;
     anRigidbody   = GetComponent <Rigidbody2D>();
     animator      = transform.GetComponent <Animator>();
     mass          = anRigidbody.mass;
     if (FindObjectOfType <Pankapu>() != null)
     {
         pankapu = FindObjectOfType <Pankapu>().transform;
         Physics2D.IgnoreCollision(pankapu.GetComponent <Collider2D>(), transform.GetComponent <Collider2D>());
     }
     EventCenter.AddListener(EventType.AnDeath, CheckDeath);
 }
Exemplo n.º 2
0
 void Awake()
 {
     startPosition = transform.position;
     startRotation = transform.localRotation;
     EventCenter.AddListener(EventType.AnRespawn, Reset);
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     EventCenter.AddListener(EventType.KnifeStop, StopRolling);
     _cucumber = transform.Find("Cucumber");
     time      = 0;
 }
Exemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     mass = 95;
     EventCenter.AddListener(EventType.AnRespawn, Reset);
 }