public GravityMech(Square pLocation, Pilot pPilot) : base(pLocation, pPilot, 3, 4) { mFirstSlot = new GravWell(this); mSecondSlot = new VekHormones(this); }
/* * Handles Trigger Events. * Tag: Death - Forces Player to respawn. * Tag: Respawn - Sets the Players respawn point and rotates gravity. * Tag: Coin - Collects Coin. */ void OnTriggerEnter(Collider cx) { if (!drain(cx)){ if (cx.tag.Equals("Death")) respawn(); if (cx.tag.Equals("Respawn")){ spawn = (GravWell)cx.GetComponent(typeof(GravWell)); phys = spawn.phys; finalGravityAngle = cx.transform.eulerAngles.z*Mathf.PI/180.0f; rotateSpeed = spawn.rotateSpeed; } } }