Example #1
0
 public void AfterHug(Vector2 targetPos)
 {
     s_renderer.enabled = true;
     state              = GirlState.Follow;
     target             = defaultFollow;
     transform.position = targetPos;
 }
Example #2
0
    private void Update()
    {
        if (NextState == GirlState.MOVING_TOWARDS_UNI)
        {
            RandomMovement rm = GetComponent <RandomMovement>();
            if (rm)
            {
                rm.StopAllCoroutines();
            }
        }

        if (NextState == GirlState.DONE)
        {
            FindObjectOfType <GameManager>().GirlIsReady();
            transform.position = new Vector3(1000, 1000, 1000);
            girlInLibrary.SetActive(true);
        }

        if (NextState != GirlState.NONE && NextState != CurrentState)
        {
            CurrentState = NextState;
            NextState    = GirlState.NONE;
        }

        if (CurrentState == GirlState.MOVING_TOWARDS_UNI)
        {
            MoveTowardsTarget(universityTarget.transform.position);
        }

        WalkAnimation();
        previousPosition = transform.position;
    }
Example #3
0
    void FixedUpdate()
    {
        Debug.Log(girlState);
        if (_near_flag)
        {
            girlState = GirlState.Player_with;
        }
        else if (Sister_Event.isEnd)
        {
            girlState = GirlState.sister_bakemono_switch_Event;
        }
        else
        {
            girlState = GirlState.Default;
        }
        switch (girlState)
        {
        case GirlState.Default:
            DefaultMove();
            break;

        case GirlState.Player_with:
            Player_WithMove();
            break;

        case GirlState.sister_bakemono_switch_Event:
            Sister_Bakemono_Switch();
            break;

        default:
            break;
        }
    }
Example #4
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (CurrentState == GirlState.MOVING_TOWARDS_UNI && collision.gameObject.GetInstanceID() == universityTarget.GetInstanceID())
     {
         NextState = GirlState.DONE;
     }
 }
Example #5
0
 void Start()
 {
     girlState  = GirlState.Default;
     _near_flag = false;
     anim       = GetComponent <Animator>();
     rb         = GetComponent <Rigidbody>();
     UpperLimitAngle.enabled = false;
     ArmLimitAngle.enabled   = false;
     HandLimitAngle.enabled  = false;
     fullBodyBipedIK.enabled = false;
 }
Example #6
0
    public override void Interact(Action action, Clickable target)
    {
        if (!target.enabled)
        {
            return;
        }

        if (action == Action.DO_SICK_MATH)
        {
            NextState = GirlState.MOVING_TOWARDS_UNI;
        }
    }
Example #7
0
    void Block()
    {
        girlAnim.SetTrigger("Idle");
        if (moveChecker.IsAir())
        {
            Fall();
        }
        if (moveChecker.IsClose(target.transform.position, state))
        {
            return;
        }
        if (moveChecker.IsCliff())
        {
            return;
        }
        if (moveChecker.IsObstacle())
        {
            return;
        }

        state = oldState;
    }
Example #8
0
    void EnemyAI()
    {
        Vector3 targetPos = player.position;

        targetPos.y = transform.position.y;
        distance    = Vector3.Distance(targetPos, transform.position);
        if (distance <= MaxDistance)
        {
            Debug.Log("进入追踪范围");
            if (distance <= MinDistance)
            {
                Debug.Log("开始攻击动画");
                StartCoroutine(autoattack());
            }
            else
            {
                state = GirlState.walk;
                transform.LookAt(targetPos);
                characterController.SimpleMove(transform.forward * speed);
            }
        }
        else
        {
            AnimatorStateInfo animinfo = anim.GetCurrentAnimatorStateInfo(0);

            ////判断当前播放动画名称,如果是walk,则向前行走
            if (timer > time)
            {
                timer = 0;
                judgeState();
            }
            if (animinfo.IsName("walk"))
            {
                characterController.SimpleMove(transform.forward * speed);
            }
        }
    }
Example #9
0
    private void Follow(Vector2 _targetPos)
    {
        Debug.DrawLine(_targetPos + Vector2.up * 0.1f, _targetPos - Vector2.up * 0.1f, Color.red);
        Debug.DrawLine(_targetPos + Vector2.right * 0.1f, _targetPos - Vector2.right * 0.1f, Color.red);
        if (moveChecker.IsAir())
        {
            Fall();
            return;
        }
        if (moveChecker.IsClose(_targetPos, state))
        {
            girlAnim.SetTrigger("Idle");
            if (state == GirlState.Switch)
            {
                target.gameObject.GetComponent <Switch>().Interaction();
                state  = GirlState.Follow;
                target = defaultFollow;
            }

            return;
        }
        if (moveChecker.IsObstacle())
        {
            oldState = state;
            state    = GirlState.Block;
            return;
        }

        if (moveChecker.IsCliff())
        {
            oldState = state;
            state    = GirlState.Block;
            return;
        }
        Move();
        return;
    }
Example #10
0
    void FixedUpdate()
    {
        if (Girl_Hand.seize_flag)
        {
            girlState = GirlState.Player_with;
        }
        else
        {
            girlState = GirlState.Default;
        }
        switch (girlState)
        {
        case GirlState.Default:
            DefaultMove();
            break;

        case GirlState.Player_with:
            Player_WithMove();
            break;

        default:
            break;
        }
    }
Example #11
0
    public bool IsClose(Vector3 targetPos, GirlState state)
    {
        followDistance = followDistanceOrigin;
        if (state == GirlState.Switch)
        {
            followDistance = interactionDistance;
        }

        moveDirection = MoveDirection.Left;
        if (targetPos.x >= transform.position.x)
        {
            moveDirection = MoveDirection.Right;
        }

        // 일정거리 미만일 시.
        float targetDistance = Mathf.Abs(targetPos.x - transform.position.x);

        if (targetDistance <= followDistance)
        {
            return(true);
        }

        return(false);
    }
Example #12
0
 IEnumerator autoattack()
 {
     state = GirlState.attack;
     yield return(new WaitForSeconds(0.0f));
 }
Example #13
0
    private void HandleTalking(List <string> output, string input)
    {
        if (girlState == GirlState.PostStarted)
        {
            if (input.Contains("give") && input.Contains("chocolate"))
            {
                output.Add("I get on one knee and whip out my pocket chocolate");
                output.Add("ignite_my_pocket_rocket_for_some_pocket_chocolate.wav");
                output.Add("She's delighted by my wit so we hide under the bleachers between classes");
                output.Add("She asks, do you want a b*****b or sex?");
                girlState = GirlState.PostChocolate;
            }
            else if (input.Contains("give") && input.Contains("chips"))
            {
                output.Add("I can't give a swell dame this like chips!");
                output.Add("She needs some finery, like chocolate or something");
            }
            else if (input.Contains("look"))
            {
                output.Add("I look around for something to give her");
                output.Add("I always keep a stash of pocket chocolate");
            }
            else
            {
                output.Add("Instantly mortified, we just interacted!");
                output.Add("Gotta do something to really wow her");
            }
        }
        else
        {
            if (input.Contains("b*****b"))
            {
                output.Add("She smiles and pulls down my sweats");
                output.Add("The band starts practicing in the gym");
                output.Add("feelsgood.man");
                output.Add("I start to lose myself in the music and the moment");
                output.Add("I whisper sexy shit in her ear");
                output.Add("\"Yeah, you own that dick, you better never let it go\"");
                output.Add("imgonnacum.png");
                output.Add("I only get one shot, can't miss this chance");
                output.Add("I blow mom's spaghetti all over her sweater");
                output.Add("You can do anything you set your mind to, man");
                output.Add(GameManager.DumpLines);
                GameManager.Instance.UnlockMedal(output, "be eminem", MedalTypes.BeEminem);
                output.Add("(be me to play again)");
                GameManager.Instance.ResetGame();
            }
            else if (input.Contains("f**k"))
            {
                output.Add("She pulls her pants down and waves her ass at me");
                output.Add("So nervous, I can't get it up");
                output.Add("Attempt the windmill to get blood flowing");
                output.Add("gottagofast.gif");
                output.Add("The bleachers are rattling, but I only have a semi");
                output.Add("suddenly, she dons her robe and wizard's hat");
                output.Add("andwehaveliftoff.mp3");
                output.Add("we f**k for three classes");
                output.Add("everything_went_better_than_expected.jpg");

                output.Add(GameManager.DumpLines);
                GameManager.Instance.UnlockMedal(output, "be bloodninja", MedalTypes.BeBloodNinja);
                output.Add("(be me to play again)");
                GameManager.Instance.ResetGame();
            }
            else if (input.Contains("both"))
            {
                output.Add("\"wynautboth?\" - shoulder devil");
                output.Add("\"don't be greedy, shithole\" - shoulder angel");
            }
        }
    }
Example #14
0
 public void Reset()
 {
     this.locationState = Locations.Start;
     this.pencilState   = PencilState.NotStolen;
     this.girlState     = GirlState.PostStarted;
 }
Example #15
0
 public void BeforeHug(Vector2 targetPos)
 {
     state = GirlState.Hug;
     s_renderer.enabled = false;
 }
Example #16
0
 public void ChangeState(GirlState _state)
 {
     girl.state = _state;
 }
Example #17
0
 void Start()
 {
     girlState = GirlState.Default;
     anim      = GetComponent <Animator>();
 }