Beispiel #1
0
 private void Awake()
 {
     m_Anim       = GetComponent <Animator>();
     platformMask = 1 << 20;
     wallMask     = 1 << 23;
     patrolWalls  = transform.FindChild("PatrolWalls").gameObject;
     unitparams   = gameObject.GetComponent <UnityStandardAssets._2D.UnitParams>();
     speed        = unitparams.speed;
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     unit_params     = GetComponent <UnityStandardAssets._2D.UnitParams>();
     punch_timer     = unit_params.punch_cd;
     punch_dur_timer = 0.0f;
     shoot_timer     = 0.0f;
     punching        = false;
     PunchObject     = transform.Find("Punch").gameObject;
     canShoot        = true;
     canPunch        = false;
     enemy           = null;
 }
Beispiel #3
0
 void Start()
 {
     unit_params = transform.parent.GetComponent <UnityStandardAssets._2D.UnitParams>();
 }