示例#1
0
    public void Start()
    {
        god = GameObject.Find("God").GetComponent<SoundGod>();
        tickTime = 1.0 / goldTicksPerSecond;
        tickTimer = 0.0;

        carController = transform.parent.transform.parent.GetComponent<StephenCarController>();

        line = gameObject.GetComponent<LineRenderer>();
        system = gameObject.transform.GetChild(0).transform.GetChild(0).GetComponentInChildren<ParticleSystem>();
        system.enableEmission = false;
        system.Clear();
        //EraseLine();
    }
示例#2
0
 void Start()
 {
     god = GameObject.Find("God").GetComponent<SoundGod>();
 }
示例#3
0
    void Start()
    {
        //the sound god is the source of all sound
        god = GameObject.Find("God").GetComponent<SoundGod>();

        //what weapons are allowed;
        existingWeapons.Add((int)weaponIndices.MISSILE);
        existingWeapons.Add((int)weaponIndices.MINE);
        existingWeapons.Add((int)weaponIndices.SPATULA);
        existingWeapons.Add((int)weaponIndices.BOOST);
        existingWeapons.Add((int)weaponIndices.GLOVE);
        existingWeapons.Add((int)weaponIndices.BETTER_GOLD_GUN);

        //you start with the gold gun selected, and its in slot 0
        selectedSlot = 0;
        selectedWeapon = 0;

        //we need to know which player we are working with
        //so we know which input to aknowledge
        string playerName = transform.parent.name;
        if (playerName == "Player01" )
        {
            playerNumber = 0;
        }
        else if (playerName == "Player02" )
        {
            playerNumber = 1;
        }
        else if (playerName == "Player03" )
        {
            playerNumber = 2;
        }
        else if (playerName == "Player04" )
        {
            playerNumber = 3;
        }
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        timeLimet = 60 * 3;
        //timeLimet = 60 * 5;
        //timeLimet = 300;
        //timeLimet = 60 * 5;

        startGameTime = Time.time;

        playerNames = new string[]{"Player01", "Player02", "Player03", "Player04"};

        //boxWidth = 200.0f;
        //boxHeight = 25.0f;

        boxWidth = 220.0f;
        boxHeight = 40.0f;

        runTime = 0.0f;
        warnTime = 1;

        god = GameObject.Find("God").GetComponent<SoundGod>();
    }