public override void onLoad() { base.onLoad(); moveStrategy = new ConstJumpMove(); jumpStrategy = new SimpleJump(); entityMass = 1.5f; }
void Awake() { sj = gameObject.GetComponent <SimpleJump>(); sm = gameObject.GetComponent <SimpleMovement>(); ssh = gameObject.GetComponentInChildren <SimpleArmory>(); rb = gameObject.GetComponent <Rigidbody2D>(); gravity = Mathf.Abs(Physics2D.gravity.y); }
void Awake() { rb = gameObject.GetComponent <Rigidbody2D>(); anim = gameObject.GetComponent <Animator>(); sj = gameObject.GetComponent <SimpleJump>(); sm = gameObject.GetComponent <SimpleMovement>(); ssh = gameObject.GetComponentInChildren <SimpleArmory>(); st = gameObject.GetComponent <SimpleStats>(); body = gameObject.GetComponent <SpriteRenderer>(); blood = transform.Find("Blood").GetComponent <SpriteRenderer>(); shoulder = transform.Find("Shoulder Pad").GetComponent <SpriteRenderer>(); back = transform.Find("Shoulder Back").GetComponent <SpriteRenderer>(); gun = GameObject.FindGameObjectWithTag("Gun").transform; renderGun = gun.GetComponent <SpriteRenderer>(); point = gun.Find("Point"); timer = 1f; }