Exemplo n.º 1
0
    //public float speed = 10.0f;

    // Use this for initialization
    void Start()
    {
        if (!(inputmanager = this.GetComponent <Input_manager>()))
        {
            inputmanager = this.gameObject.AddComponent <Input_manager>();
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        myRB      = GetComponent <Rigidbody>();
        thePlayer = thePlayer.GetComponent <Player_mov>();

        if (!(inputmanager = this.GetComponent <Input_manager>()))
        {
            inputmanager = this.gameObject.AddComponent <Input_manager>();
        }
    }
Exemplo n.º 3
0
 //! Assign variables
 void Start()
 {
     // Set the gravity
     Physics.gravity = new Vector3(0, -50f, 0);
     // Get the input manager component.
     input_manager = GetComponent <Input_manager>();
     // Get the rigid body component
     rb = GetComponent <Rigidbody>();
     // Set the jump vectors Y component to jump force.
     jump_vector = new Vector3(0, jump_force, 0);
     // Set rigid bodies maxAngularVelocity
     rb.maxAngularVelocity = maxAngularVelocity;
 }