void Start()
 {
     _itemScript   = GameObject.Find("Game manager").GetComponent <Item_script>();
     _gameManager  = GameObject.Find("Game manager").GetComponent <Game_manager>();
     _notification = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
     _questManager = GameObject.Find("Game manager").GetComponent <Quest_manager_script>();
 }
 private void Start()
 {
     _notification   = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
     _characterStats = GameObject.Find("Game manager").GetComponent <Character_stats>();
     _combatManager  = GameObject.Find("Game manager").GetComponent <Combat_manager_script>();
     enemies         = GameObject.Find("Game manager").GetComponent <Enemy_manager_script>().enemies;
 }
 void Start()
 {
     _notification = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
     _itemScript   = GameObject.Find("Game manager").GetComponent <Item_script>();
     restockItems();
     //StartCoroutine(Restock());
 }
Exemple #4
0
 void Start()
 {
     _gameManager    = GameObject.Find("Game manager").GetComponent <Game_manager>();
     _combatManager  = GameObject.Find("Game manager").GetComponent <Combat_manager_script>();
     _notification   = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
     _characterStats = GameObject.Find("Game manager").GetComponent <Character_stats>();
     _spellScript    = GameObject.Find("Game manager").GetComponent <Spell_script>();
 }
    private void Start()
    {
        _notification   = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
        _gameManager    = GameObject.Find("Game manager").GetComponent <Game_manager>();
        _characterStats = GameObject.Find("Game manager").GetComponent <Character_stats>();

        checkAvailableQuests();
    }
Exemple #6
0
    public void checkConfirm()
    {
        _notification = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();

        if (character_name.text.Length >= 1)
        {
            if (isNewCharacter)
            {
                GameObject.Find("Authorization").GetComponent <Authorization_script>().ShowAuthorization("confirmCustomization", 0);
            }
            else
            {
                GameObject.Find("Authorization").GetComponent <Authorization_script>().ShowAuthorization("confirmReCustomization", 0);
            }
        }
        else
        {
            _notification.message("You must choose a name!", 3, "red");
        }
    }
Exemple #7
0
    public void initializeBattle(int id)
    {
        _characterStats     = GameObject.Find("Game manager").GetComponent <Character_stats>();
        _characterManager   = GameObject.Find("Character").GetComponent <Character_manager>();
        _notification       = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
        _enemyManagerScript = GameObject.Find("Game manager").GetComponent <Enemy_manager_script>();
        _itemScript         = GameObject.Find("Game manager").GetComponent <Item_script>();
        _spellScript        = GameObject.Find("Game manager").GetComponent <Spell_script>();
        isPaused            = false;

        _spellScript.actualizeSpells();
        _spellScript.setupAttributes();

        _healthBar        = GameObject.Find("Health_bar").GetComponent <Bar_script>();
        _resourceBar      = GameObject.Find("Resource_bar").GetComponent <Bar_script>();
        _spellbarAnimator = GameObject.Find("Spellbar").GetComponent <Animator>();

        GameObject.Find("Item_preview").GetComponent <Animator>().Play("Item_preview_slide_out_anim");
        GameObject.Find("Inventory slots").GetComponent <Animator>().Play("Inventory_slide_out_anim");
        GameObject.Find("Conversation").GetComponent <Conversation_script>().closeConversation();

        _spellScript.target = null;

        StopAllCoroutines();
        isOngoing = true;

        if (gameObject.GetComponent <Game_manager>().current_screen.name == "Combat_screen_UI")
        {
            if (_characterStats.Player_health > _characterStats.Player_max_health || _characterStats.Player_health < 0)
            {
                _characterStats.Player_health = _characterStats.Player_max_health;
                _healthBar.updateHealth();
            }

            if (_characterStats.Player_resource > _characterStats.Player_max_resource || _characterStats.Player_resource < 0)
            {
                _characterStats.Player_resource = _characterStats.Player_max_resource;
                _resourceBar.updateResource();
            }
        }

        battle_id = id;

        _characterStats.Player_health   = _characterStats.Player_max_health;
        _characterStats.Player_resource = _characterStats.Player_max_resource;

        _healthBar.updateHealth();
        _resourceBar.updateResource();
        GameObject.Find("Spell_preview").GetComponent <Visibility_script>().setInvisible();

        remaining_time.GetComponent <Text_animation>().startAnim((round_time).ToString(), 0.05f);

        opponent_ids = battles[id].opponent_ids;

        opponents[0].GetComponent <Enemy_script>().enemyInitialize(battles[id].opponent_ids[0]);
        opponents[1].GetComponent <Enemy_script>().enemyInitialize(battles[id].opponent_ids[1]);

        generateSequence();


        _notification.message("¤" + battles[id].battle_name, 3);

        battle_background.GetComponent <SpriteRenderer>().sprite = battles[id].background;


        round_counter = 0;
        timer         = 0;
        changeRound();
    }
Exemple #8
0
    public void initializeConversations()
    {
        conversations.Clear();

        _notification   = GameObject.Find("Notification").GetComponent <Ingame_notification_script>();
        _characterStats = GameObject.Find("Game manager").GetComponent <Character_stats>();


        _charName = _characterStats.Player_name;

        /*----------------------------------
        *  COMMANDS:
        *   - none
        *   - next
        *   - exit
        *   - skip:where
        *   - change_dialog:id
        *   - item_add:id
        *   - money_add:amount
        *   - money_remove:amount
        *   - xp_add:amount
        *   - quest_add:id
        *   - quest_remove:id
        *   - start_battle:id
        *  ----------------------------------*/

        conversations.Add((new Conversation(0, "", "", new List <string>()
        {
            "", "", ""
        },
                                            new List <string>()
        {
            "",
            "",
            ""
        },
                                            new List <string>()
        {
            "", "", ""
        },
                                            new List <string>()
        {
            "exit", "next", "next"
        },

                                            new List <string>()
        {
            "", "", ""
        },
                                            new List <string>()
        {
            "exit", "next", "next"
        }
                                            )));

        conversations.Add((new Conversation(1, "Exploring the hub", "quest", new List <string>()
        {
            "Zachary", "Zachary", "Zachary"
        },
                                            new List <string>()
        {
            "Hello " + _charName + "! I've been waiting for you!",
            "My name is <b>Zachary</b>. I'm the instructor of the new recruits.",
            "Your first task is to find and speak with <b>David</b> in the hub. He might need some urgent help. \n\nAre you ready?"
        },

                                            new List <string>()
        {
            "Hello!", "Nice to meet you Zachary", "I'm ready!"
        },
                                            new List <string>()
        {
            "next", "next", "quest_add:1"
        },

                                            new List <string>()
        {
            "Nevermind.", "Nevermind.", "No."
        },
                                            new List <string>()
        {
            "exit", "exit", "finalexit"
        }
                                            )));

        conversations.Add((new Conversation(2, "Welcome to the HUB", "quest", new List <string>()
        {
            "David", "David", "David", "David"
        },
                                            new List <string>()
        {
            "Hi! How can I help you?",
            "So are you a recruit? I should've known.\n\nWhats your name?",
            "A pleasure to meet you " + _charName + "! I will instruct you on your first battle against two opponents! It won't be hard, I promise! ",
            "You need to defeat these two recruits as a training. If you fail, you can try any time you want."
        },

                                            new List <string>()
        {
            "Zachary told me to speak with you.", "I'm " + _charName, "...", "Let's fight!"
        },
                                            new List <string>()
        {
            "next", "next", "next", "start_battle:1"
        },

                                            new List <string>()
        {
            "Nevermind.", "Let's cut to the chase.", "Nevermind.", "No."
        },
                                            new List <string>()
        {
            "exit", "skip:3", "exit", "finalexit"
        }
                                            )));

        conversations.Add((new Conversation(3, "Kaalin's day", "normal", new List <string>()
        {
            "Kaalin"
        },
                                            new List <string>()
        {
            "I forgot something important...what was that?...\n\nOh...Hi! "
        },

                                            new List <string>()
        {
            "...Hi!"
        },
                                            new List <string>()
        {
            "finalexit"
        },

                                            new List <string>()
        {
            "Nevermind."
        },
                                            new List <string>()
        {
            "none"
        }
                                            )));

        conversations.Add((new Conversation(4, "Meeting with the others", "normal", new List <string>()
        {
            "Kaalin"
        },
                                            new List <string>()
        {
            "Hello! Are you new here too?\n\nMy name is <b>Kaalin</b>, I came from Europe! This is my first day. The view is so nice from here!",
        },

                                            new List <string>()
        {
            "I'm " + _charName + "."
        },
                                            new List <string>()
        {
            "next"
        },

                                            new List <string>()
        {
            "Nevermind."
        },
                                            new List <string>()
        {
            "exit"
        }
                                            )));

        conversations.Add((new Conversation(5, "Life in the station", "normal", new List <string>()
        {
            "David", "David"
        },
                                            new List <string>()
        {
            "Hello recruit!\n\nAre you completed the trials?",
            "Then wait for your next task! You will receive it soon."
        },

                                            new List <string>()
        {
            "Yes!", "Ok."
        },
                                            new List <string>()
        {
            "next", "finalexit"
        },

                                            new List <string>()
        {
            "No!", "Nevermind."
        },
                                            new List <string>()
        {
            "change_dialog:6", "exit"
        }
                                            )));

        conversations.Add((new Conversation(6, "The trials", "normal", new List <string>()
        {
            "David"
        },
                                            new List <string>()
        {
            "Then you should speak with <b>Zachary</b>. ",
        },

                                            new List <string>()
        {
            "Ok."
        },
                                            new List <string>()
        {
            "exit"
        },

                                            new List <string>()
        {
            "Nevermind."
        },
                                            new List <string>()
        {
            "exit"
        }
                                            )));

        conversations.Add((new Conversation(7, "The current situation", "normal", new List <string>()
        {
            "Zachary", "Zachary"
        },
                                            new List <string>()
        {
            "We are waiting three more supply shipments from Earth. The station requested it a month ago.\n\nThis is worrisome.",
            "Maybe it's just a mistake...\n\n I should investigate.",
        },

                                            new List <string>()
        {
            "There are problems with the supplies?", "Goodbye."
        },
                                            new List <string>()
        {
            "next", "exit"
        },

                                            new List <string>()
        {
            "Nevermind.", "Nevermind."
        },
                                            new List <string>()
        {
            "exit", "exit"
        }
                                            )));


        conversations.Add((new Conversation(8, "Repel the cultists", "quest", new List <string>()
        {
            "David", "David", "David", "David"
        },
                                            new List <string>()
        {
            "Wha...What was that? \n\nDid you heard that noise?",
            "Someone got inside the station! \n\nStop them! Quickly!\n\n<color=#828282><i>Use the Random battle console until you find cultists.</i></color>"
        },

                                            new List <string>()
        {
            "What noise?", "I'm on my way!"
        },
                                            new List <string>()
        {
            "next", "quest_add:2"
        },

                                            new List <string>()
        {
            "No.", "Nevermind."
        },
                                            new List <string>()
        {
            "exit", "exit"
        }
                                            )));

        conversations.Add((new Conversation(9, "Interrogation", "quest", new List <string>()
        {
            "Thief", "Thief", "Thief", "Thief"
        },
                                            new List <string>()
        {
            "...I will not say anything to you!\n\n\n...or anyone else...",
            "I'm innocent! I was dragged into this!",
            "If I tell you, you will spare me? Right?",
            "I was with a red haired woman called Kyra. Her friend was in a mask, and used an alias <b>'Delta'</b>."
        },

                                            new List <string>()
        {
            "Are you sure?", "Tell me your companions' name.", "I will.", "You are free to go. "
        },
                                            new List <string>()
        {
            "next", "next", "next", "finalexit"
        },

                                            new List <string>()
        {
            "Nevermind.", "Nevermind.", "I can't promise anything.", "You will face trial by combat."
        },
                                            new List <string>()
        {
            "exit", "exit", "next", "start_battle:4"
        }
                                            )));

        conversations.Add((new Conversation(10, "Stolen supplies", "normal", new List <string>()
        {
            "Thief"
        },
                                            new List <string>()
        {
            "I've done nothing! Please help me! ",
        },

                                            new List <string>()
        {
            "..."
        },
                                            new List <string>()
        {
            "none"
        },

                                            new List <string>()
        {
            "Nevermind."
        },
                                            new List <string>()
        {
            "exit"
        }
                                            )));
    }