// Use this for initialization protected override void Start() { base.Starting(); ResetGravity(); playerOrigin = this.gameObject.transform.position; gravityDirection = Physics.gravity; topGizPos = TopBurner.transform.localPosition; bottomGixPos = BottomBurner.transform.localPosition; BottomBurner.SetActive(false); TopBurner.SetActive(false); distToGround = this.gameObject.GetComponent <Collider2D>().bounds.extents.y; }
public override void AssignBurner() { if (gravityFlipped == -1 && !TopBurner.activeInHierarchy) { TopBurner.SetActive(true); BottomBurner.SetActive(false); } else if (gravityFlipped == 1 && !BottomBurner.activeInHierarchy) { TopBurner.SetActive(false); BottomBurner.SetActive(true); } if (grounded) { TopBurner.SetActive(false); BottomBurner.SetActive(false); } }