Exemplo n.º 1
0
    /// <summary>
    /// Keeps track of the units health value and triggers the dying state if it reaches a value of 0 or less
    /// </summary>
    public override void Update()
    {
        if (Health <= 0)
        {
            owner.TransitionTo <CowDyingState>();
        }

        //OwnerPhysics.SetVelocity(AIagent.velocity / Time.deltaTime);

        //if (Vector3.Distance(Position.position, GameComponent.GetComponent<GameComponetns>().PlayerPosition) > GameComponent.GetComponent<GameComponetns>().renderDistance)
        //    owner.TransitionTo<CowNonRenderState>();
    }