コード例 #1
0
 // Use this for initialization
 void Start()
 {
     anim          = GetComponent <Animator> ();
     currentHealth = startingHealth;
     playerAudio   = GetComponent <AudioSource> ();
     thisPlayer    = GetComponent <PlayerAccesor>();
 }
コード例 #2
0
ファイル: PlayerHealth.cs プロジェクト: Vive-Ricochet/main2.0
	// Use this for initialization
	void Start () {
		anim = GetComponent <Animator> ();
		currentHealth = startingHealth;
		playerAudio = GetComponent <AudioSource> ();
        thisPlayer = GetComponent<PlayerAccesor>();

	}
コード例 #3
0
ファイル: PlayerDash.cs プロジェクト: Vive-Ricochet/main2.0
    // Use this for initialization
    void Start() {
        animate = GetComponent<Animator>();

        // Get my accessor
        myStats = GetComponent<PlayerAccesor>();
        // Get Player movement
        PM = GetComponent<PlayerMovement>();

        // Get values from player movement
        speed = PM.getSpeed();
        rotationSpeed = PM.getRotationSpeed();
        PlayerCamera = PM.getPlayerCamera();
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        animate = GetComponent <Animator>();

        // Get my accessor
        myStats = GetComponent <PlayerAccesor>();
        // Get Player movement
        PM = GetComponent <PlayerMovement>();

        // Get values from player movement
        speed         = PM.getSpeed();
        rotationSpeed = PM.getRotationSpeed();
        PlayerCamera  = PM.getPlayerCamera();
    }
コード例 #5
0
    //float isMovingH = 0.0f;
    //float isMovingV = 0.0f;

    void Start()
    {
        input = GameObject.Find("InputManager").GetComponent <InputManager>();

        // initialize my accessor
        myStats = GetComponent <PlayerAccesor>();
        myStats.setDashing(false);
        myStats.setCharging(false);

        // rigid body used for in-engine physics
        rb = GetComponent <Rigidbody>();
        //dashing = false;
        //charging = false;
        animator = GetComponent <Animator>();



        // gravity is intended to be used for this object
        rb.useGravity   = true;
        Physics.gravity = new Vector3(0f, -30.0f, 0f);
    }
コード例 #6
0
    //float isMovingH = 0.0f;
    //float isMovingV = 0.0f;

    void Start() {

        // initialize my accessor
        myStats = GetComponent<PlayerAccesor>();
        myStats.setDashing(false);
        myStats.setCharging(false);

        // rigid body used for in-engine physics 
        rb = GetComponent<Rigidbody>();
        //dashing = false;
		//charging = false;
        animator = GetComponent<Animator>();



		
        // gravity is intended to be used for this object
        rb.useGravity = true;
        Physics.gravity = new Vector3(0f, -30.0f, 0f);

    }