Beispiel #1
0
    public void Shoot()
    {
        FindObjectOfType <AudioManager>().Play("cannon");
        RaycastHit[] hits;
        hits = Physics.SphereCastAll(transform.position, radius, transform.forward, range, shootableMask);

        if (hits.Length > 0)
        {
            for (int i = 0; i < hits.Length; i++)
            {
                //Debug.Log(hits[i].collider.name); to check what i am hitting
                shootHit = hits[i];
                if (gyroScript = shootHit.collider.gameObject.GetComponent <GyroBot>())
                {
                    //gyroScript.modeHacked = false;
                    gyroScript.hackedTimer = 0;
                    gyroScript.ActivateSeekPlayer();
                }
                if (swarmBot = shootHit.collider.gameObject.GetComponent <SwarmBot>())
                {
                    swarmBot.SeekPlayer();
                }
                if (healthPickup = shootHit.collider.gameObject.GetComponent <HealthPickup>())
                {
                    if (playerStats.curHealth != 100)
                    {
                        healthPickup.SeekPlayer();
                    }
                }
                if (darkDexPickup = shootHit.collider.gameObject.GetComponent <DarkDexPickup>())
                {
                    darkDexPickup.SeekPlayer();
                }
                if (energyPickup = shootHit.collider.gameObject.GetComponent <EnergyPickup>())
                {
                    if (playerStats.curEnergy != 100)
                    {
                        energyPickup.SeekPlayer();
                    }
                }
                if (partsPickup = shootHit.collider.gameObject.GetComponent <Parts>())
                {
                    partsPickup.SeekPlayer();
                }
                if (memeBot = shootHit.collider.gameObject.GetComponent <MemeBot>())
                {
                    memeBot.SeekPlayer();
                }
            }
        }
    }
Beispiel #2
0
        static void MenuHelper(MemeBot bot)
        {
            System.Console.WriteLine("Enter twitch channel name: ");

            string twitch_target = System.Console.ReadLine();

            System.Console.WriteLine($"Enter 1 to connect to {twitch_target}.\nEnter 0 to enter a new channel");
            string connect_var = System.Console.ReadLine();

            if (connect_var == "1")
            {
                bot.ConnectClient();
            }
            if (connect_var == "0")
            {
                MenuHelper(bot);
            }
        }
Beispiel #3
0
        static void MenuHelper()
        {
            System.Console.WriteLine("Start bot in Expermental Mode? Type 1 to enable Experimental mode.");

            bool   Exp_Mode;
            string Exp_String = System.Console.ReadLine();

            switch (Exp_String)
            {
            case "1":
                Exp_Mode = true;
                break;

            default:
                Exp_Mode = false;
                break;
            }

            System.Console.WriteLine("Enter twitch channel name: ");

            string twitch_target = System.Console.ReadLine();

            MemeBot bot = new MemeBot(twitch_target, Exp_Mode);

            System.Console.WriteLine($"Enter 1 to connect to {twitch_target}.\nEnter 0 to enter a new channel");
            string connect_var = System.Console.ReadLine();

            if (connect_var == "1")
            {
                bot.ConnectClient();
            }
            if (connect_var == "0")
            {
                MenuHelper(bot);
            }
        }