Graphics Reference
In-Depth Information
// fire / action buttons
public bool Fire1;
// weapon slots
public bool Slot1;
public bool Slot2;
public bool Slot3;
public bool Slot4;
public bool Slot5;
public bool Slot6;
public bool Slot7;
public bool Slot8;
public bool Slot9;
public float vert;
public float horz;
public bool shouldRespawn;
public Vector3 TEMPVec3;
private Vector3 zeroVector = new Vector3(0,0,0);
public virtual void CheckInput ()
{
// override with your own code to deal with input
horz=Input.GetAxis ("Horizontal");
vert=Input.GetAxis ("Vertical");
}
public virtual float GetHorizontal()
{
// returns our cached horizontal input axis value
return horz;
}
public virtual float GetVertical()
{
// returns our cached vertical input axis value
return vert;
}
public virtual bool GetFire()
{
return Fire1;
}
public bool GetRespawn()
{
return shouldRespawn;
}
public virtual Vector3 GetMovementDirectionVector()
{
// temp vector for movement dir gets set to the value of an
// otherwise unused vector that always has the value of 0,0,0
TEMPVec3=zeroVector;
// if we're going left or right, set the velocity vector's X
// to our horizontal input value
if(Left || Right)
Search WWH ::




Custom Search