Exemplo n.º 1
0
    void Start()
    {
        GameStateScript.addStateListener(this);

        transforms      = PlayerScript.GetAllPlayerTransforms();
        pointTransforms = new Transform[transforms.Length];
        for (int i = 0; i < transforms.Length; i++)
        {
            GameObject tmp = (GameObject)Instantiate(playerPointPrefab);

            pointTransforms[i] = tmp.transform;
            Vector3 originalScale = pointTransforms[i].localScale;
            pointTransforms[i].parent     = transform.parent;
            pointTransforms[i].localScale = originalScale;

            if (i == 0)
            {
                UISprite sprite = tmp.GetComponent <UISprite>();
                sprite.color = new Color(1, 0.2f, 0.2f);
                sprite.depth = 10;
            }
        }

        updatePosition();
    }
Exemplo n.º 2
0
    void Start()
    {
        GameStateScript.addStateListener(this);

        // AudioSource mainAudio = FindObjectOfType(typeof(AudioSource));
        //mainAudio = GetComponents<AudioSource>();

        audio1 = playerCamera.GetComponents <AudioSource>();

        /* foreach (HingeJoint joint in hingeJoints) {
         *   joint.useSpring = false;
         * }*/
        //audio1 = playerCamera[0];
    }
Exemplo n.º 3
0
 void Start()
 {
     GameStateScript.addStateListener(this);
 }
Exemplo n.º 4
0
 void Start()
 {
     GameStateScript.addStateListener(this);
     player = PlayerScript.FindPlayerById(playerId);
 }