Beispiel #1
0
    void Start()
    {
        Application.targetFrameRate = 120;
        joystick  = FindObjectOfType <Joystick>();
        joybutton = FindObjectOfType <JoyButton>();
        bar       = NetworkBehaviour.FindObjectOfType <Bar>();
        arrow     = NetworkBehaviour.FindObjectOfType <ArrowObj>();
        //press = NetworkBehaviour.FindObjectOfType<Press>();

        moveSpeed = boatstatus.Player1.movementspeed * 3;
        //picIndex = PlayerPrefs.GetInt("BoatPic");
        //currentSprite = sprite;
        //boatSprite = currentSprite.GetComponentInChildren<SpriteRenderer>().sprite;


        if (bar != null)
        {
            bar.gameObject.SetActive(false);
        }
        if (arrow != null)
        {
            arrow.gameObject.SetActive(false);
        }

        /*if(press != null)
         * {
         *  press.gameObject.SetActive(false);
         * }*/
        if (moveSpeed == 0)
        {
            moveSpeed = 10;
        }
    }
 void Start()
 {
     player1Solo = GameObject.FindObjectOfType <Player1_Controller_Solo>();
     playerMult  = NetworkBehaviour.FindObjectOfType <Player1_Controller_Mult>();
     temp        = new GameObject();
     temp        = gameObject;
     audioSource = GetComponent <AudioSource>();
     center      = transform.position;
     FindCorrectPlayer();
 }
Beispiel #3
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.FindObjectOfType <Player1_Controller_Solo>();
     if (player == null)
     {
         FindCorrectPlayer();
         playerMult = NetworkBehaviour.FindObjectOfType <Player1_Controller_Mult>();
     }
     dock   = this.gameObject;
     gm     = GameObject.FindObjectOfType <GameManager>();
     center = transform.position;
 }
Beispiel #4
0
    // Start is called before the first frame update
    void Start()
    {
        if (NetworkBehaviour.FindObjectOfType <Player1_Controller_Mult>() != null)
        {
            player = NetworkBehaviour.FindObjectOfType <Player1_Controller_Mult>();
            print("Player" + player.name);
        }
        else
        {
            player     = null;
            playerSolo = GameObject.FindObjectOfType <Player1_Controller_Solo>();
        }

        checkRefugeeType();
        setRefugeeType();
        timerRunning = true;
        dest         = (int)Random.Range(0, 4);
        animate();
        FindCorrectPlayer();
    }