Ejemplo n.º 1
0
    public IEnumerator EndConversation(AbstractEntity argEntity)
    {
        if (argEntity is Speaker)
        {
            //Go to idle pose

            ThirdPersonCamera.offset -= new Vector3(1, 1, 0) * 0.25f;
            ThirdPersonCamera.distance += 0.5f;
            ThirdPersonCamera.height -= 0.5f;

            AbstractBeing being = argEntity.GetComponent<AbstractBeing>();
            if(being != null)
                being.Animation.CrossFade(AnimationResources.Idle);

            yield return StartCoroutine(argEntity.Deactivate(Speaker));

            // Re-Enable Controllers
            if (ThirdPersonController != null)
                ThirdPersonController.enabled = true;

            // Disable GUIs
            RemoteGUI.Label = "";
            RemoteGUI.Action = null;
            //DialogueGUI.CurrentLine = null;
            DialogueGUI.TransOut = true;
        }
    }
Ejemplo n.º 2
0
    protected IEnumerator CloseDoor(AbstractEntity argEntity)
    {
        //// Wait on Delay
        //if (_IsTimedDoor)
        //    yield return new WaitForSeconds(_DoorCloseDelay);

        StartCoroutine(argEntity.Deactivate(Speaker));
        yield return new WaitForFixedUpdate();
    }
Ejemplo n.º 3
0
    protected IEnumerator DropItem(AbstractEntity argEntity)
    {
        StartCoroutine(argEntity.Deactivate(Speaker));

        //Vision.objectsInRadius.Remove(argEntity.GameObject);
        //_StoredTarget.Drop();
        argEntity.rigidbody.useGravity = true;
        argEntity.rigidbody.isKinematic = false;
        argEntity.collider.isTrigger = false;

        argEntity.Transform.parent = null;
        argEntity.Transform.position += Vector3.up * .25f;

        yield return new WaitForSeconds(1);
    }
Ejemplo n.º 4
0
    protected IEnumerator StopClimbing(AbstractEntity argEntity)
    {
        StartCoroutine(argEntity.Deactivate(Speaker));

        GetComponent<ThirdPersonController>().enabled = true;

        GetComponent<ThirdPersonController>()._Gravity = 20;

        climbCheck = false;

        yield return new WaitForFixedUpdate();
    }
Ejemplo n.º 5
0
    protected IEnumerator UnpossessLiving(AbstractEntity argEntity)
    {
        StartCoroutine(argEntity.Deactivate(Speaker));

        WorldGUI.Mode = Mode.Spirit;
        Ghost.Animation[AnimationResources.PossExit].speed = 1; ;
        Ghost.Animation.CrossFade(AnimationResources.PossExit);
        //argEntity.animation.CrossFade(AnimationResources.PossExit);

        Ghost.Unpossess(argEntity as AbstractLivingBeing);

        while (Ghost.Animation.IsPlaying(AnimationResources.PossExit))
            yield return new WaitForFixedUpdate();

        Soundtrack.PlayClip("GhostLayer", -1);
    }