Beispiel #1
0
        //public Vector3 Target_Position;
        //public Vector3 Map_Start_Pos;
        //float f_Last_Zoom_Amount;
        //public Vector3 Offset;

        public void Set_Up_Attack_Vars(GameObject Passed_Target, bool b_Is_Enemy_Attack_Passed, float Passed_Power_Level, float Passed_Range_Level)
        {
            //set up the base power/range.
            f_Damage_Level = Passed_Power_Level;
            f_Range_Level  = Passed_Range_Level;

            Empty_Target_Pos = new GameObject();
            Empty_Target_Pos.transform.parent = GameObject.Find(Current_Strings.Name_Map_Parent).transform;
            //set the parent to be the normal map.
            //Owner = transform.parent.gameObject;
            //transform.parent = GameObject.Find(Current_Strings.Name_Map_Parent).transform;

            b_Is_Enemy_Attack = b_Is_Enemy_Attack_Passed;
            //will set up the target and such here it will need to be passed.
            Target = Passed_Target;
            Empty_Target_Pos.transform.position = Target.transform.position;

            Main_Script = GameObject.Find(Current_Strings.Name_Main_Script_Holder).GetComponent <Player_Main_Script>();
            //f_Last_Zoom_Amount = Main_Script.f_Zoom_Level;
            //Map_Start_Pos = GameObject.Find(Current_Strings.Name_Map_Parent).transform.position;
            b_Set_Up_And_Ready = true;
            //Debug.Log("Setup");

            //going to have to generate out a gameobject/point, and set it to the same parent as the target posistion so that when zoom/move accours it stays locked on.
        }
Beispiel #2
0
        //Create the enemy with all the stats needed to get it going.
        public void Set_Enemy(string p_Name, int p_Wave_Number, float p_HP, float p_Speed, float p_Power, int p_Amount, int p_Start_After, int p_Reward_Single, int p_Reward_Wave, string p_Mod, bool b_Is_Spawner)
        {
            //get the main script to connect to it/start calls in it when we are finished setting things up.
            Main_Script = GameObject.Find(Current_Strings.Name_Main_Script_Holder).GetComponent <Player_Main_Script>();

            s_Name          = p_Name;
            i_Wave_Number   = p_Wave_Number;
            f_HP            = p_HP;
            f_Max_HP        = p_HP;
            f_Speed         = p_Speed;
            f_Power         = p_Power;
            i_Amount        = p_Amount;
            i_Start_After   = p_Start_After;
            i_Reward_Single = p_Reward_Single;
            i_Reward_Wave   = p_Reward_Wave;
            s_Mod           = p_Mod;

            //set the scale by comparing against the locked gems. if it's not in there we set/keep at one.
            for (int i = 0; i < Main_Script.Locked_Gems.Locked_Gem_List.Count; i++)
            {
                //all locked gems can also be enemies so we use that list to also check for scales/sizes.
                if (Main_Script.Locked_Gems.Locked_Gem_List[i].Name == s_Name)
                {
                    f_Scale_Amount = Main_Script.Locked_Gems.Locked_Gem_List[i].f_Scale_Amount;
                    f_Range        = Main_Script.Locked_Gems.Locked_Gem_List[i].f_Range_Amount;
                }
            }

            if (!b_Is_Spawner)
            {
                b_Spawn_Tracker = false;
            }
        }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        Main_Script = GameObject.Find("Main_Script").GetComponent <Player_Main_Script>();
        Cur_Mesh    = GetComponent <TextMesh>();

        //now to re-posistion to be dead center on top. //MIGHT NEED TO DO LATER
        float screenAspect = (float)Screen.width / (float)Screen.height;
        float cameraHeight = Camera.allCameras[0].orthographicSize * 2;
        float cameraWidth  = cameraHeight * screenAspect;
    }
Beispiel #4
0
        // Use this for initialization
        void Start()
        {
            //Debug.Log("Working");
            //get the main script to connect to it/start calls in it when we are finished setting things up.
            Main_Script = GameObject.Find(Current_Strings.Name_Main_Script_Holder).GetComponent <Player_Main_Script>();

            //this works for transparancy.
            //we get the child/ghost and make it transparent.
            for (int i = 0; i < gameObject.transform.childCount; i++)
            {
                gameObject.transform.GetChild(i).GetComponent <SpriteRenderer>().color = new Color(1f, 1f, 1f, 0f);
            }

            //this.gameObject.GetComponent<SpriteRenderer>().color = new Color(1f, 1f, 1f, .5f);
        }
Beispiel #5
0
    //This is what level we will be loading, for now it's not here just because we are going to generate out the hotboxes.

    // Use this for initialization
    void Start()
    {
        //get the main script to connect to it/start calls in it when we are finished setting things up.
        Main_Script = GameObject.Find(Current_Strings.Name_Main_Script_Holder).GetComponent <Player_Main_Script>();

        //First we will create the hotbars.
        Setup_Hotbar();
        //set up the inventory boxes.
        Setup_Inventory_Boxes();
        //we set up the fuse menu
        Setup_Fuse_Menu();
        //loads the level we are playing.
        Load_Level_Save();

        //after the level is loaded or default we then create/set up the purchase menu with the unlocked gems.
        Setup_Purchase_Menu();

        //This will set up the enemy UI screen.
        Setup_Enemy_Viewer();
    }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        Main_Script = GameObject.Find("Main_Script").GetComponent <Player_Main_Script>();

        //set the HP Gage.
        HP_Gage = Instantiate(Resources.Load(Main_Script.Current_Strings.Prefab_HP_Gage)) as GameObject;

        if (tag.Contains(Main_Script.Current_Strings.Tag_Enemy))
        {
            Object_Type = 'e';
            HP_Max      = GetComponent <Enemy>().f_Max_HP;
        }
        else if (tag.Contains(Main_Script.Current_Strings.Tag_Finish_Temple))
        {
            Object_Type = 't';
            HP_Max      = Main_Script.i_Max_HP;
        }
        else
        {
            //no item found in our list so we don't update the hp gage and we debug log it.
            Perform_Update = false;
            Debug.Log("HP_Gage no object type found on" + transform.parent.name);
        }
    }
 // Use this for initialization
 void Start()
 {
     Main_Script = GameObject.Find(Current_Strings.Name_Main_Script_Holder).GetComponent <Player_Main_Script>();
 }