Пример #1
0
    // Use this for initialization
    void Start()
    {
        car_state = GetComponent <csCarState>();
        //  head = transform.FindChild("Head_Point").gameObject;

        Transform[] tempTransforms = gameObject.GetComponentsInChildren <Transform>();

        foreach (Transform child in tempTransforms)
        {
            if (child.name.Contains("Head_Point"))
            {
                head = child.gameObject;
            }
            if (child.name.Contains("Tail_Point"))
            {
                tail = child.gameObject;
            }
            if (child.name.Contains("FrontLeg_Point"))
            {
                front_Leg = child.gameObject;
            }
            if (child.name.Contains("MiddleLeg_Point"))
            {
                middle_Leg = child.gameObject;
            }
            if (child.name.Contains("BackLeg_Point"))
            {
                back_Leg = child.gameObject;
            }
        }
        StateUpdate();
    }
Пример #2
0
 void Start()
 {
     car              = GetComponent <CarController>();
     car_state        = GetComponent <csCarState>();
     ai               = GetComponent <CarAIControl>();
     tracker          = GetComponent <WaypointProgressTracker>();
     Original_Destroy = GameObject.Find("Original_Target_Setting").GetComponent <csDestroy_Original>();
     Ranking          = GameObject.Find("Directional Light").GetComponent <csRanking>();
     GameTimer        = GameObject.Find("Directional Light").GetComponent <csGameTimer>();
 }
Пример #3
0
    ///

    void Start()
    {
        GooglePlayGames.PlayGamesPlatform.Activate();

        P1_Button_Text.text = UserManager.Instance().name;

        GameFIN = GameObject.Find("Directional Light").GetComponent <csGameFINISH>();

        P1_Name.text = UserManager.Instance().name;

        Player1_traker = GameObject.Find("MyPlayer").GetComponent <WaypointProgressTracker>();
        Player2_traker = GameObject.Find("Computer1").GetComponent <WaypointProgressTracker>();
        Player3_traker = GameObject.Find("Computer2").GetComponent <WaypointProgressTracker>();
        Player4_traker = GameObject.Find("Computer3").GetComponent <WaypointProgressTracker>();

        Player1_CollCheck = GameObject.Find("MyPlayer").GetComponent <csCollisionCheck>();
        Player2_CollCheck = GameObject.Find("Computer1").GetComponent <csCollisionCheck>();
        Player3_CollCheck = GameObject.Find("Computer2").GetComponent <csCollisionCheck>();
        Player4_CollCheck = GameObject.Find("Computer3").GetComponent <csCollisionCheck>();

        P1_Car_State = GameObject.Find("MyPlayer").GetComponent <csCarState>();
        P2_Car_State = GameObject.Find("Computer1").GetComponent <csCarState>();
        P3_Car_State = GameObject.Find("Computer2").GetComponent <csCarState>();
        P4_Car_State = GameObject.Find("Computer3").GetComponent <csCarState>();

        P1_Carcontroller = GameObject.Find("MyPlayer").GetComponent <CarController>();
        P2_Carcontroller = GameObject.Find("Computer1").GetComponent <CarController>();
        P3_Carcontroller = GameObject.Find("Computer2").GetComponent <CarController>();
        P4_Carcontroller = GameObject.Find("Computer3").GetComponent <CarController>();

        P1_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P1_Speed1_0x = P1_Car_State.maxSpeed * 1.2f;
        P1_Speed1_1x = P1_Car_State.maxSpeed * 1.5f;
        P1_Speed1_2x = P1_Car_State.maxSpeed * 2.0f;

        P2_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P2_Speed1_0x = P2_Car_State.maxSpeed * 1.2f;
        P2_Speed1_1x = P2_Car_State.maxSpeed * 1.5f;
        P2_Speed1_2x = P2_Car_State.maxSpeed * 2.0f;

        P3_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P3_Speed1_0x = P3_Car_State.maxSpeed * 1.2f;
        P3_Speed1_1x = P3_Car_State.maxSpeed * 1.5f;
        P3_Speed1_2x = P3_Car_State.maxSpeed * 2.0f;

        P4_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P4_Speed1_0x = P4_Car_State.maxSpeed * 1.2f;
        P4_Speed1_1x = P4_Car_State.maxSpeed * 1.5f;
        P4_Speed1_2x = P4_Car_State.maxSpeed * 2.0f;
    }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        car_state = GetComponent<csCarState>();
          //  head = transform.FindChild("Head_Point").gameObject;

        Transform[] tempTransforms = gameObject.GetComponentsInChildren<Transform>();

        foreach (Transform child in tempTransforms)
        {
            if (child.name.Contains("Head_Point"))
            {
                head = child.gameObject;

            }
            if (child.name.Contains("Tail_Point"))
            {
                tail = child.gameObject;

            }
            if (child.name.Contains("FrontLeg_Point"))
            {
                front_Leg = child.gameObject;

            }
            if (child.name.Contains("MiddleLeg_Point"))
            {
                middle_Leg = child.gameObject;

            }
            if (child.name.Contains("BackLeg_Point"))
            {
                back_Leg = child.gameObject;

            }
        }
        StateUpdate();
    }
Пример #5
0
    ///
    void Start()
    {
        GooglePlayGames.PlayGamesPlatform.Activate();

        P1_Button_Text.text = UserManager.Instance().name;

        GameFIN = GameObject.Find("Directional Light").GetComponent<csGameFINISH>();

        P1_Name.text = UserManager.Instance().name;

        Player1_traker = GameObject.Find("MyPlayer").GetComponent<WaypointProgressTracker>();
        Player2_traker = GameObject.Find("Computer1").GetComponent<WaypointProgressTracker>();
        Player3_traker = GameObject.Find("Computer2").GetComponent<WaypointProgressTracker>();
        Player4_traker = GameObject.Find("Computer3").GetComponent<WaypointProgressTracker>();

        Player1_CollCheck = GameObject.Find("MyPlayer").GetComponent<csCollisionCheck>();
        Player2_CollCheck = GameObject.Find("Computer1").GetComponent<csCollisionCheck>();
        Player3_CollCheck = GameObject.Find("Computer2").GetComponent<csCollisionCheck>();
        Player4_CollCheck = GameObject.Find("Computer3").GetComponent<csCollisionCheck>();

        P1_Car_State = GameObject.Find("MyPlayer").GetComponent<csCarState>();
        P2_Car_State = GameObject.Find("Computer1").GetComponent<csCarState>();
        P3_Car_State = GameObject.Find("Computer2").GetComponent<csCarState>();
        P4_Car_State = GameObject.Find("Computer3").GetComponent<csCarState>();

        P1_Carcontroller = GameObject.Find("MyPlayer").GetComponent<CarController>();
        P2_Carcontroller = GameObject.Find("Computer1").GetComponent<CarController>();
        P3_Carcontroller = GameObject.Find("Computer2").GetComponent<CarController>();
        P4_Carcontroller = GameObject.Find("Computer3").GetComponent<CarController>();

        P1_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P1_Speed1_0x = P1_Car_State.maxSpeed * 1.2f;
        P1_Speed1_1x = P1_Car_State.maxSpeed * 1.5f;
        P1_Speed1_2x = P1_Car_State.maxSpeed * 2.0f;

        P2_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P2_Speed1_0x = P2_Car_State.maxSpeed * 1.2f;
        P2_Speed1_1x = P2_Car_State.maxSpeed * 1.5f;
        P2_Speed1_2x = P2_Car_State.maxSpeed * 2.0f;

        P3_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P3_Speed1_0x = P3_Car_State.maxSpeed * 1.2f;
        P3_Speed1_1x = P3_Car_State.maxSpeed * 1.5f;
        P3_Speed1_2x = P3_Car_State.maxSpeed * 2.0f;

        P4_Speed1_Ex = P1_Car_State.maxSpeed * 0.8f;
        P4_Speed1_0x = P4_Car_State.maxSpeed * 1.2f;
        P4_Speed1_1x = P4_Car_State.maxSpeed * 1.5f;
        P4_Speed1_2x = P4_Car_State.maxSpeed * 2.0f;
    }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     car_state         = GetComponent <csCarState>();
     car_state.isSmart = true;
 }
Пример #7
0
 // Use this for initialization
 void Start()
 {
     car_state          = GetComponent <csCarState>();
     car_state.isJumper = true;
 }
Пример #8
0
 void Start()
 {
     car = GetComponent<CarController>();
     car_state = GetComponent<csCarState>();
     ai = GetComponent<CarAIControl>();
     tracker = GetComponent<WaypointProgressTracker>();
     Original_Destroy = GameObject.Find("Original_Target_Setting").GetComponent<csDestroy_Original>();
     Ranking = GameObject.Find("Directional Light").GetComponent<csRanking>();
     GameTimer = GameObject.Find("Directional Light").GetComponent<csGameTimer>();
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     car_state = gameObject.transform.parent.GetComponent <csCarState>();
 }
Пример #10
0
    ///
    void Start()
    {
        GameFIN = GameObject.Find("Directional Light").GetComponent<csGameFINISH>();

        Player1_traker = GameObject.Find("MyPlayer").GetComponent<WaypointProgressTracker>();
        Player2_traker = GameObject.Find("Computer1").GetComponent<WaypointProgressTracker>();
        Player3_traker = GameObject.Find("Computer2").GetComponent<WaypointProgressTracker>();
        Player4_traker = GameObject.Find("Computer3").GetComponent<WaypointProgressTracker>();

        Player1_CollCheck = GameObject.Find("MyPlayer").GetComponent<csCollisionCheck>();
        Player2_CollCheck = GameObject.Find("Computer1").GetComponent<csCollisionCheck>();
        Player3_CollCheck = GameObject.Find("Computer2").GetComponent<csCollisionCheck>();
        Player4_CollCheck = GameObject.Find("Computer3").GetComponent<csCollisionCheck>();

        P1_Car_State = GameObject.Find("MyPlayer").GetComponent<csCarState>();
        P2_Car_State = GameObject.Find("Computer1").GetComponent<csCarState>();
        P3_Car_State = GameObject.Find("Computer2").GetComponent<csCarState>();
        P4_Car_State = GameObject.Find("Computer3").GetComponent<csCarState>();

        P1_Carcontroller = GameObject.Find("MyPlayer").GetComponent<CarController>();
        P2_Carcontroller = GameObject.Find("Computer1").GetComponent<CarController>();
        P3_Carcontroller = GameObject.Find("Computer2").GetComponent<CarController>();
        P4_Carcontroller = GameObject.Find("Computer3").GetComponent<CarController>();

        P1_Speed1_0x = P1_Car_State.maxSpeed;
        P1_Speed1_1x = P1_Car_State.maxSpeed * 1.5f;
        P1_Speed1_2x = P1_Car_State.maxSpeed * 2.0f;

        P2_Speed1_0x = P2_Car_State.maxSpeed;
        P2_Speed1_1x = P2_Car_State.maxSpeed * 1.5f;
        P2_Speed1_2x = P2_Car_State.maxSpeed * 2.0f;

        P3_Speed1_0x = P3_Car_State.maxSpeed;
        P3_Speed1_1x = P3_Car_State.maxSpeed * 1.5f;
        P3_Speed1_2x = P3_Car_State.maxSpeed * 2.0f;

        P4_Speed1_0x = P4_Car_State.maxSpeed;
        P4_Speed1_1x = P4_Car_State.maxSpeed * 1.5f;
        P4_Speed1_2x = P4_Car_State.maxSpeed * 2.0f;
    }
Пример #11
0
 // Use this for initialization
 void Start()
 {
     car_state = GetComponent<csCarState>();
     car_state.isSmart = true;
 }
Пример #12
0
 // Use this for initialization
 void Start()
 {
     car_state = gameObject.transform.parent.GetComponent<csCarState>();
 }
Пример #13
0
 // Use this for initialization
 void Start()
 {
     car_state = GetComponent<csCarState>();
     car_state.isJumper = true;
 }