CharacterBase.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
    public void Update()
    {
        float horz = Input.GetAxis("Horizontal") * speed;
        float vert = Input.GetAxis("Vertical") * speed;
        GetComponent<Rigidbody>().AddForce( new Vector3( horz, 0, vert ) );

        if (Input.GetKeyDown(KeyCode.G) ) {
            takeDamage(1f);
        }
    }

Usage Example

コード例 #1
0
 void Update()
 {
     character.Update();
 }
All Usage Examples Of CharacterBase::Update