Beispiel #1
0
    void Start()
    {
        count     = 0;
        countText = new GUIText();
        SetCountText();

        EmotivEngine engine = this.GetComponent("EmotivEngine") as EmotivEngine;

        character = engine.character;
    }
Beispiel #2
0
    void FixedUpdate()
    {
        Vector3 movement;
        Vector3 movementUp     = new Vector3(0, 0, 0);
        float   moveHorizontal = Input.GetAxis("Horizontal");
        float   moveVertical   = Input.GetAxis("Vertical");

        if (Input.GetKeyDown(KeyCode.Space))
        {
            movementUp += new Vector3(0.0f, 10.0f, 0.0f);
        }
        EmotivEngine engine = this.GetComponent("EmotivEngine") as EmotivEngine;

        character = engine.character;

        movement = new Vector3(moveHorizontal, 0.0f, moveVertical) + movementUp;
        movement = movement * speed * Time.deltaTime;

        rigidbody.AddForce(movement);
    }
Beispiel #3
0
 // Use this for initialization
 void Start()
 {
     character = new EmotionalCharacter(o, c, e, a, n);
     actions   = new List <EmotionalCharacter.Action>();
     conseqs   = new List <EmotionalCharacter.Consequence>();
 }