コード例 #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
ファイル: csCarInfoUpdate.cs プロジェクト: Reiie/K-K
    // 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
ファイル: csRanking.cs プロジェクト: Reiie/Creature_Race
    ///
    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
ファイル: csSmart.cs プロジェクト: fafara/Creature_Race
 // Use this for initialization
 void Start()
 {
     car_state         = GetComponent <csCarState>();
     car_state.isSmart = true;
 }
コード例 #7
0
ファイル: csJumper.cs プロジェクト: fafara/Creature_Race
 // 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
ファイル: csRanking.cs プロジェクト: Reiie/K-K
    ///
    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
ファイル: csSmart.cs プロジェクト: Reiie/Creature_Race
 // 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
ファイル: csJumper.cs プロジェクト: Reiie/Creature_Race
 // Use this for initialization
 void Start()
 {
     car_state = GetComponent<csCarState>();
     car_state.isJumper = true;
 }