コード例 #1
0
 public void EndDialogue()
 {
     if (inDialogue)
     {
         Debug.Log("Ending dialogue...");
         inDialogue = false;
         SaveLoad.SaveDialogue();
         CenterBoxAnimator.SetBool("Active", false);
         EternalBeingScript.EndCinematic();
     }
 }
コード例 #2
0
    // Setting up the parties
    public void SetUpParties(CharacterInfo[] party, CharacterInfo[] encounter, MapInfo passedInfo)
    {
        //Spawn characters
        SpawnCharacters(party, encounter);
        StaggerEntrances();

        loadedInfo = passedInfo;

        EternalBeingScript.StartCinematic();
        StartCoroutine(Entrance());
    }
コード例 #3
0
 public void StartDialogue()
 {
     if (!inDialogue)
     {
         Debug.Log("Starting dialogue...");
         inDialogue = true;
         CenterBoxAnimator.SetBool("Active", true);
         textBox.text = "";
         EternalBeingScript.StartCinematic();
     }
 }
コード例 #4
0
 // Use this for initialization
 void Awake()
 {
     if (EternalBeingScript.instance == null)
     {
         EternalBeingScript.instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #5
0
    private IEnumerator Entrance()
    {
        yield return(new WaitForSeconds(0.01f));

        while (!AllReady())
        {
            yield return(null);
        }
        EternalBeingScript.EndCinematic();
        ActivateAllReady();
        //condition = GO;
        yield break;
    }
コード例 #6
0
    // Update is called once per frame
    void LateUpdate()
    {
        rightHeld = Input.GetKey(rightBind);
        leftHeld  = Input.GetKey(leftBind);
        upHeld    = Input.GetKey(upBind);
        downHeld  = Input.GetKey(downBind);
        switch (controlState)
        {
        case TESTING_STATE:
            //Behaviour for testing stat
            if (Input.GetKey(KeyCode.Space))
            {
                Debug.Log("InputReceiver line 74");
            }
            break;

        case BATTLE_STATE:
            //Determine heldDirection
            if (!EternalBeingScript.CINEMATIC)
            {
                switch (inputStyle)
                {
                case KEYBOARD_INPUT:
                    if (Input.GetKeyDown(rightBind))
                    {
                        heldDirection = HELD_RIGHT;
                    }
                    else if (Input.GetKeyDown(upBind))
                    {
                        heldDirection = HELD_UP;
                    }
                    else if (Input.GetKeyDown(downBind))
                    {
                        heldDirection = HELD_DOWN;
                    }
                    else if (Input.GetKeyDown(leftBind))
                    {
                        heldDirection = HELD_LEFT;
                    }

                    switch (heldDirection)
                    {
                    case HELD_LEFT:
                        if (!leftHeld)
                        {
                            if (rightHeld)
                            {
                                heldDirection = HELD_RIGHT;
                            }
                            else if (upHeld)
                            {
                                heldDirection = HELD_UP;
                            }
                            else if (downHeld)
                            {
                                heldDirection = HELD_DOWN;
                            }
                            else
                            {
                                heldDirection = HELD_NONE;
                            }
                        }
                        break;

                    case HELD_UP:
                        if (!upHeld)
                        {
                            if (rightHeld)
                            {
                                heldDirection = HELD_RIGHT;
                            }
                            else if (downHeld)
                            {
                                heldDirection = HELD_DOWN;
                            }
                            else if (leftHeld)
                            {
                                heldDirection = HELD_LEFT;
                            }
                            else
                            {
                                heldDirection = HELD_NONE;
                            }
                        }

                        break;

                    case HELD_DOWN:
                        if (!downHeld)
                        {
                            if (rightHeld)
                            {
                                heldDirection = HELD_RIGHT;
                            }
                            else if (upHeld)
                            {
                                heldDirection = HELD_UP;
                            }
                            else if (leftHeld)
                            {
                                heldDirection = HELD_LEFT;
                            }
                            else
                            {
                                heldDirection = HELD_NONE;
                            }
                        }

                        break;

                    case HELD_RIGHT:
                        if (!rightHeld)
                        {
                            if (upHeld)
                            {
                                heldDirection = HELD_UP;
                            }
                            else if (downHeld)
                            {
                                heldDirection = HELD_DOWN;
                            }
                            else if (leftHeld)
                            {
                                heldDirection = HELD_LEFT;
                            }
                            else
                            {
                                heldDirection = HELD_NONE;
                            }
                        }

                        break;
                    }
                    break;

                case MOUSE_INPUT:
                    heldDirection = HELD_NONE;
                    Debug.Log("Not supported yet");
                    break;
                }

                if (heldDirection != HELD_NONE && !(Slot.ALLY_SLOTS[heldDirectionString] as SingularSlot).entity.IsAlive())
                {
                    heldDirection = HELD_NONE;
                }


                if (heldDirection != HELD_NONE)
                {
                    if (EternalBeingScript.GetBattleManager() != null)
                    {
                        if (Input.GetKeyDown(attack1Bind))
                        {
                            //Debug.Log("InputAttack1");
                            (Slot.ALLY_SLOTS[heldDirectionString] as SingularSlot).entity.DoAttack(1);
                        }
                        else if (Input.GetKeyDown(attack2Bind))
                        {
                            //Debug.Log("InputAttack2");
                            (Slot.ALLY_SLOTS[heldDirectionString] as SingularSlot).entity.DoAttack(2);
                        }
                        else if (Input.GetKeyDown(attack3Bind))
                        {
                            //Debug.Log("InputAttack3");
                            (Slot.ALLY_SLOTS[heldDirectionString] as SingularSlot).entity.DoAttack(3);
                        }
                        else if (Input.GetKeyDown(attack4Bind))
                        {
                            //Debug.Log("InputAttack4");
                            (Slot.ALLY_SLOTS[heldDirectionString] as SingularSlot).entity.DoAttack(4);
                        }
                    }
                }
            }
            break;

        case BATTLE_OVER_SCREEN:
            heldDirection = 0;
            if (Input.GetKey(KeyCode.Space))
            {
                battleLoader.GetComponent <BattleLoaderScript>().GetBattleManagerInstance().FinishExit();
            }
            break;
        }
        FixHolds();
    }
コード例 #7
0
 private void Exit(char condition)
 {
     inputReciever.SetControlState(InputReciever.BATTLE_OVER_SCREEN);
     EternalBeingScript.StartCinematic();
     this.condition = condition;
 }
コード例 #8
0
 //Cower
 //Reduces all character's speed
 protected override void DoAttack4()
 {
     EternalBeingScript.GetBattleManager().DealFullAoe(new BuffCarrier(0, this, new Attack4Effects(cowerSymbol)), true);
 }