Exemple #1
0
 public KartState(GameObject _kart, KartState _lastState = null)
 {
     kart = _kart;
     lastState = _lastState;
     name = "nameless state";
     kb = kart.GetComponent<KartBehaviour>();
 }
Exemple #2
0
 public KartState(GameObject _kart, KartState _lastState = null)
 {
     kart      = _kart;
     lastState = _lastState;
     name      = "nameless state";
     kb        = kart.GetComponent <KartBehaviour>();
 }
Exemple #3
0
 void Start()
 {
     track            = GameObject.FindGameObjectsWithTag("track")[0].transform.root.gameObject;
     trackInformation = track.GetComponent <TrackInformation>();
     camera           = transform.Find("Main Camera").gameObject;
     KB = gameObject.GetComponent <KartBehaviour>();
 }
Exemple #4
0
 void Start()
 {
     track = GameObject.FindGameObjectsWithTag("track")[0].transform.root.gameObject;
     trackInformation = track.GetComponent<TrackInformation>();
     camera = transform.Find("Main Camera").gameObject;
     KB = gameObject.GetComponent<KartBehaviour>();
 }
Exemple #5
0
	// Update is called once per frame
	void Update () 
    {
        if (KB == null)
           KB = PlayerNetwork.localPlayer.GetComponent<KartBehaviour>();

        gameObject.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, KB.steeringWheel*45));
            //new Vector3(0, 0, KB.steeringWheel);
	}
Exemple #6
0
    // Update is called once per frame
    void Update()
    {
        if (KB == null)
        {
            KB = PlayerNetwork.localPlayer.GetComponent <KartBehaviour>();
        }

        gameObject.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, KB.steeringWheel * 45));
        //new Vector3(0, 0, KB.steeringWheel);
    }
Exemple #7
0
 // Use this for initialization
 void Start()
 {
     debugMode = true;
     kartScript = transform.GetComponent<KartBehaviour>();
 }
Exemple #8
0
	public void Start () 
    {
        KB = Kart.GetComponent<KartBehaviour>();
        effectTimerCurrent = 0.0f;
        ApplyEffect();
	}
 public void Start()
 {
     KB = GetComponent<KartBehaviour>();
     Update();
 }
Exemple #10
0
 public void Start()
 {
     KB = Kart.GetComponent <KartBehaviour>();
     effectTimerCurrent = 0.0f;
     ApplyEffect();
 }
 public void Start()
 {
     KB = GetComponent <KartBehaviour>();
     Update();
 }
Exemple #12
0
 // Use this for initialization
 void Start()
 {
     debugMode  = true;
     kartScript = transform.GetComponent <KartBehaviour>();
 }