Inheritance: NetworkBehaviour
コード例 #1
0
    private void SecondStage()
    {
        if (Sloth != null)
        {
            if (i >= Sequence.Length)
            {
                i = 0;
            }
            int safe = Sequence[i] - 1;
            fallingtimer += Time.deltaTime;
            //Spawns a drop after every effect.

            if (fallingtimer > Fallspeed)
            {
                fallingtimer = 0;
                PlanksFall();
                TriggerFall(safe);
                i++;
                timesThrough++;
            }
            if (timesThrough - 1 == 3)
            {
                timesThrough = 0;
                Instantiate(TrashDrop, Platforms[safe].transform.position + new Vector3(0, 0.5f, 0), Quaternion.identity);
            }
        }
        else
        {
            i      = 0;
            rounds = BossFight.Dead;
        }
    }
コード例 #2
0
 public TwitchBotApplication(Configuration appConfig, TwitchInfoService twitchInfo, SongRequestBlacklistService songRequestBlacklist,
                             FollowerService follower, BankService bank, FollowerSubscriberListener followerListener, ManualSongRequestService manualSongRequest, PartyUpService partyUp,
                             GameDirectoryService gameDirectory, QuoteService quote, BankHeist bankHeist, TwitchChatterListener twitchChatterListener, IrcClient irc,
                             BossFight bossFight, SongRequestSettingService songRequestSetting, InGameUsernameService ign, LibVLCSharpPlayer libVLCSharpPlayer)
 {
     _appConfig    = appConfig;
     _botConfig    = appConfig.GetSection("TwitchBotConfig") as TwitchBotConfigurationSection;
     _greetedUsers = new List <string>();
     _twitchInfo   = twitchInfo;
     _follower     = follower;
     _followerSubscriberListener = followerListener;
     _bank = bank;
     _songRequestBlacklist = songRequestBlacklist;
     _manualSongRequest    = manualSongRequest;
     _gameDirectory        = gameDirectory;
     _quote                 = quote;
     _bankHeist             = bankHeist;
     _twitchChatterListener = twitchChatterListener;
     _bossFight             = bossFight;
     _songRequestSetting    = songRequestSetting;
     _ign = ign;
     _libVLCSharpPlayer = libVLCSharpPlayer;
     _irc     = irc;
     _partyUp = partyUp;
 }
コード例 #3
0
 private void Start()
 {
     player        = GameObject.FindWithTag("Player");
     fighter       = GetComponent <BossFight>();
     move          = GetComponent <Move>();
     health        = GetComponent <Health>();
     guardPosition = transform.position;
 }
コード例 #4
0
        public async Task <ActionResult> Create()
        {
            var model = new BossFight
            {
                Instances = await _instance.GetAllAsync()
            };

            return(View(model));
        }
コード例 #5
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        player = GameObject.FindWithTag("Player");
    }
コード例 #6
0
ファイル: BossControler.cs プロジェクト: nolimet/Liaka
 void Awake()
 {
     if (!bossMove)
         bossMove = GetComponent<BossMove>();
     if (!bossAnimator)
         bossAnimator = GetComponent<BossAnimation>();
     if (!bossFight)
         bossFight = GetComponent<BossFight>();
 }
コード例 #7
0
        public async Task <ActionResult> Delete(BossFight model)
        {
            var res = await _repository.Delete(model.Id);

            if (res.Success)
            {
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("", res.Message);
            return(View(model));
        }
コード例 #8
0
ファイル: RaidSelect.cs プロジェクト: nik0kin/ProjectTurtle
        internal RaidSelect(BossFight bossFight,UnlockedHeroes unlockedHeroes)
        {
            this.bossFight = bossFight;
            fightName = BossFightLibrary.getBossFightName(bossFight.getFightID());
            limit = bossFight.getBossInfo().maxplayers;//getMaxPlayers();

            raid = new PlayerClassNum[MAX_RAID_SIZE];
            for (int i = limit; i < MAX_RAID_SIZE; i++) {
                raid[i] = PlayerClassNum.cant;
            }

            backButton = new Button(new Rectangle(49, 502, 153, 80));
            startButton = new Button(new Rectangle(559, 517, 177, 68));

            vangButton = new Button(new Rectangle(10,5,63,54));
            puriButton = new Button(new Rectangle(85, 5, 63, 54));
            mageButton = new Button(new Rectangle(10, 71, 63, 54));
            assButton = new Button(new Rectangle(85, 71, 63, 54));
            archerButton = new Button(new Rectangle(10, 71 + (71 - 5), 63, 54));
            bardButton = new Button(new Rectangle(85, 71 + (71 - 5), 63, 54));

            hero1 = new Button(new Rectangle(10,245,63,54));
            hero2 = new Button(new Rectangle(85, 245, 63, 54));
            hero3 = new Button(new Rectangle(10, 312, 63, 54));
            hero4 = new Button(new Rectangle(85, 312, 63, 54));

            raidButtons = new Button[MAX_RAID_SIZE];
            raidButtons[0] = new Button(new Rectangle(443, 19, 63, 54));
            raidButtons[1] = new Button(new Rectangle(443, 82, 63, 54));
            raidButtons[2] = new Button(new Rectangle(443, 150, 63, 54));
            raidButtons[3] = new Button(new Rectangle(443, 214, 63, 54));
            raidButtons[4] = new Button(new Rectangle(443, 281, 63, 54));

            raidButtons[5] = new Button(new Rectangle(519, 19, 63, 54));
            raidButtons[6] = new Button(new Rectangle(519, 82, 63, 54));
            raidButtons[7] = new Button(new Rectangle(519, 150, 63, 54));
            raidButtons[8] = new Button(new Rectangle(519, 214, 63, 54));
            raidButtons[9] = new Button(new Rectangle(519, 281, 63, 54));

            raidButtons[10] = new Button(new Rectangle(595, 19, 63, 54));
            raidButtons[11] = new Button(new Rectangle(595, 82, 63, 54));
            raidButtons[12] = new Button(new Rectangle(595, 150, 63, 54));
            raidButtons[13] = new Button(new Rectangle(595, 214, 63, 54));
            raidButtons[14] = new Button(new Rectangle(595, 281, 63, 54));

            raidButtons[15] = new Button(new Rectangle(671, 19, 63, 54));
            raidButtons[16] = new Button(new Rectangle(671, 82, 63, 54));
            raidButtons[17] = new Button(new Rectangle(671, 150, 63, 54));
            raidButtons[18] = new Button(new Rectangle(671, 214, 63, 54));
            raidButtons[19] = new Button(new Rectangle(671, 281, 63, 54));

            mUnlockedHeroes = unlockedHeroes;
        }
コード例 #9
0
 void Start()
 {
     waveTrack   = GameObject.Find("GameController");
     tracker     = waveTrack.GetComponent <GameController> ();
     attackspeed = tracker.handSpeed;
     bossUnit    = GameObject.FindGameObjectWithTag("BossObject");
     bossScript  = bossUnit.GetComponent <BossFight> ();
     sounds      = GetComponents <AudioSource> ();
     colour      = GetComponentInChildren <SpriteRenderer> ();
     coll        = GetComponent <Collider2D> ();
     current     = colour.color;
     handLife    = 5;
     alive       = true;
     currentHand = colour.sprite;
     StartCoroutine(attackPattern());
 }
コード例 #10
0
ファイル: Bullet.cs プロジェクト: AgusRambal/ScrollingShooter
    void OnTriggerEnter2D(Collider2D hitInfo)
    {
        Enemy enemy = hitInfo.GetComponent <Enemy>();

        if (enemy != null)
        {
            enemy.TakeDamage(damage);
        }
        Destroy(gameObject);

        BossFight boss = hitInfo.GetComponent <BossFight>();

        if (boss != null)
        {
            boss.TakeDamage(damage);
        }
        Destroy(gameObject);
    }
コード例 #11
0
        public async Task <ActionResult> Edit(BossFight model)
        {
            if (!ModelState.IsValid)
            {
                model.Instances = await _instance.GetAllAsync();

                return(View(model));
            }

            var result = await _repository.Update(model);

            if (!result.Success)
            {
                ModelState.AddModelError("", result.Message);
                model.Instances = await _instance.GetAllAsync();

                return(View(model));
            }

            return(RedirectToAction("Index"));
        }
コード例 #12
0
 private void FirstStage()
 {
     if (timer < fallingtime)
     {
         int safe = Sequence[i] - 1;
         fallingtimer += Time.deltaTime;
         timer        += Time.deltaTime;
         if (fallingtimer > Fallspeed)
         {
             fallingtimer = 0;
             IndicateSafe(safe);
             TriggerFall(safe);
             i++;
         }
     }
     else
     {
         i     = 0;
         timer = 0;
         ClearLights();
         rounds = BossFight.Second;
     }
 }
コード例 #13
0
ファイル: FinalWave.cs プロジェクト: sebspas/M.A.R.V.I.N
    protected override void EndSpawn()
    {
        BossFight bossScript = GameObject.FindGameObjectWithTag("FinalGameplay").GetComponent <BossFight>();

        bossScript.Begin();
    }
コード例 #14
0
    public void StartScene(bool next)
    {
        f_nextLevelNote.SetActive(false);
        // for now, this always has the same order

        string sceneName;

        // This looks a bit stupid since essentially it is just +=1; however I made this so I could change the order more easily
        if (next)
        {
            if (!Directory.Exists("Data"))
            {
                Directory.CreateDirectory("Data");
            }

            for (int i = 0; ; ++i)
            {
                string path = "Data/Data" + i + ".txt";

                if (!File.Exists(path))
                {
                    StreamWriter fs = new StreamWriter(File.Create("Data/Data" + i + "-" + (int)m_bossFight + ".txt"));
                    fs.Write(
                        m_examinedVariable + ":" + Environment.NewLine +
                        m_bossFight + ":" + Environment.NewLine +
                        CurrentExperiment.ExperimentText
                        );
                    fs.Flush();
                    fs.Close();
                    break;
                }
            }

            switch (m_bossFight)
            {
            case BossFight.Owl:
                m_bossFight = BossFight.Rhino;
                break;

            case BossFight.Rhino:
                m_bossFight = BossFight.Frog;
                break;

            case BossFight.Frog:
                m_bossFight = (BossFight)(-1);
                break;
            }
        }

        switch (m_bossFight)
        {
        case BossFight.Owl:
            sceneName = "OwlScene";
            break;

        case BossFight.Rhino:
            sceneName = "RhinoScene";
            break;

        case BossFight.Frog:
            sceneName = "FrogScene";
            break;

        default:
            //Application.Quit();
            f_finalQuestion.SetActive(true);
            return;
        }

        m_sceneName = sceneName;

        //CurrentExperiment.NextTry();
        //this would not allow me to redo the easiest one; therefore done somewhere else

        SceneManager.LoadScene(sceneName, LoadSceneMode.Additive);

        f_tryText.text = "Phase: " + ((CurrentExperiment.EndCounter + 3 - 1) / 3) + "/2   -   Try: " + (1 + (CurrentExperiment.EndCounter - 1) % 3) + "/3";
    }
コード例 #15
0
ファイル: SyncCharacter.cs プロジェクト: JMounier/Aegina
    // Use this for initialization
    void Start()
    {
        this.character = gameObject.transform.FindChild("Character").gameObject;
        if (isServer)
            foreach (GameObject player in GameObject.FindGameObjectsWithTag("Player"))
                player.GetComponent<SyncCharacter>().Life += 0;

        if (!isLocalPlayer)
            return;

        this.inventory = gameObject.GetComponent<Inventory>();
        this.controller = gameObject.GetComponent<Controller>();
        this.bossfight = gameObject.GetComponent<BossFight>();
        this.skin = Resources.Load<GUISkin>("Sprites/GUIskin/skin");

        this.lifeMax = 100;
        this.hungerMax = 100;
        this.thirstMax = 100;
        this.life = 100;
        this.hunger = 100;
        this.thirst = 100;
        this.speed = 0;
        this.cdSpeed = 0;
        this.jump = 0;
        this.cdJump = 0;
        this.regen = 0;
        this.cdRegen = 0;
        this.poison = 0;
        this.cdPoison = 0;

        // Initialisation des images
        this.lifeBar = new Texture2D[101];
        for (int i = 0; i < 101; i++)
            this.lifeBar[i] = Resources.Load<Texture2D>("Sprites/Bars/Life/LifeBar" + i.ToString());

        this.hungerBar = new Texture2D[101];
        for (int i = 0; i < 101; i++)
            this.hungerBar[i] = Resources.Load<Texture2D>("Sprites/Bars/Hunger/HungerBar" + i.ToString());

        this.ThirstBar = new Texture2D[101];
        for (int i = 0; i < 101; i++)
            this.ThirstBar[i] = Resources.Load<Texture2D>("Sprites/Bars/Thirst/ThirstBar" + i.ToString());

        this.CmdLoad();
        this.sounAudio = gameObject.GetComponent<Sound>();
    }
コード例 #16
0
 public void SetBossFight(BossFight bf)
 {
     this.bossFight = bf;
 }
コード例 #17
0
 // Start is called before the first frame update
 void Start()
 {
     Instance          = this;
     badMissileRot     = Quaternion.Euler(-90, transform.rotation.y, transform.rotation.z);
     missileBarrageRot = Quaternion.Euler(16, 90, -90);
 }
コード例 #18
0
        /// <summary>
        /// Engage in the boss fight minigame
        /// </summary>
        /// <param name="chatter">User that sent the message</param>
        public async Task <DateTime> BossFight(TwitchChatter chatter)
        {
            try
            {
                BossFight bossFight = new BossFight();
                int       funds     = await _bank.CheckBalanceAsync(chatter.Username, _broadcasterInstance.DatabaseId);

                if (_bossSettingsInstance.IsBossFightOnCooldown())
                {
                    TimeSpan cooldown = _bossSettingsInstance.CooldownTimePeriod.Subtract(DateTime.Now);

                    if (cooldown.Minutes >= 1)
                    {
                        _irc.SendPublicChatMessage(_bossSettingsInstance.CooldownEntry
                                                   .Replace("@timeleft@", cooldown.Minutes.ToString()));
                    }
                    else
                    {
                        _irc.SendPublicChatMessage(_bossSettingsInstance.CooldownEntry
                                                   .Replace("@timeleft@", cooldown.Seconds.ToString())
                                                   .Replace("minutes", "seconds"));
                    }

                    return(DateTime.Now);
                }

                if (_bossSettingsInstance.RefreshBossFight)
                {
                    _irc.SendPublicChatMessage($"The boss fight is currently being refreshed with new settings @{chatter.DisplayName}");
                    return(DateTime.Now);
                }

                if (bossFight.HasFighterAlreadyEntered(chatter.Username))
                {
                    _irc.SendPublicChatMessage($"You are already in this fight @{chatter.DisplayName}");
                    return(DateTime.Now);
                }

                if (funds < _bossSettingsInstance.Cost)
                {
                    _irc.SendPublicChatMessage($"You do need {_bossSettingsInstance.Cost} {_botConfig.CurrencyType} to enter this fight @{chatter.DisplayName}");
                    return(DateTime.Now);
                }

                if (!bossFight.IsEntryPeriodOver())
                {
                    ChatterType chatterType = ChatterType.DoesNotExist;

                    // join boss fight
                    if (chatter.Badges.Contains("moderator") ||
                        chatter.Badges.Contains("admin") ||
                        chatter.Badges.Contains("global_mod") ||
                        chatter.Badges.Contains("staff") ||
                        chatter.Username == _botConfig.Broadcaster.ToLower())
                    {
                        chatterType = ChatterType.Moderator;
                    }
                    else if (chatter.Badges.Contains("subscriber") || chatter.Badges.Contains("vip"))
                    {
                        chatterType = ChatterType.Subscriber;
                    }
                    // ToDo: Create new columns in the BossFightClassStats table for VIP stats
                    //else if (chatter.Badges.Contains("vip"))
                    //{
                    //    chatterType = ChatterType.VIP;
                    //}
                    else
                    {
                        chatterType = _twitchChatterListInstance.GetUserChatterType(chatter.Username);
                        if (chatterType == ChatterType.DoesNotExist)
                        {
                            using (HttpResponseMessage message = await _twitchInfo.CheckFollowerStatusAsync(chatter.TwitchId))
                            {
                                // check if chatter is a follower
                                if (!message.IsSuccessStatusCode)
                                {
                                    int currentExp = await _follower.CurrentExpAsync(chatter.Username, _broadcasterInstance.DatabaseId);

                                    if (_follower.IsRegularFollower(currentExp, _botConfig.RegularFollowerHours))
                                    {
                                        chatterType = ChatterType.RegularFollower;
                                    }
                                    else
                                    {
                                        chatterType = ChatterType.Follower;
                                    }
                                }
                                else
                                {
                                    chatterType = ChatterType.Viewer;
                                }
                            }
                        }
                    }

                    // make boss fight announcement if first fighter and start recruiting members
                    if (_bossSettingsInstance.Fighters.Count == 0)
                    {
                        _bossSettingsInstance.EntryPeriod = DateTime.Now.AddSeconds(_bossSettingsInstance.EntryPeriodSeconds);
                        _irc.SendPublicChatMessage(_bossSettingsInstance.EntryMessage.Replace("user@", chatter.Username));
                    }

                    FighterClass fighterClass = _bossSettingsInstance.ClassStats.Single(c => c.ChatterType == chatterType);
                    BossFighter  fighter      = new BossFighter {
                        Username = chatter.Username, FighterClass = fighterClass
                    };
                    bossFight.Produce(fighter);
                    await _bank.UpdateFundsAsync(chatter.Username, _broadcasterInstance.DatabaseId, funds - _bossSettingsInstance.Cost);

                    // display new boss level
                    if (!string.IsNullOrEmpty(bossFight.NextLevelMessage()))
                    {
                        _irc.SendPublicChatMessage(bossFight.NextLevelMessage());
                    }
                }
            }
            catch (Exception ex)
            {
                await _errHndlrInstance.LogError(ex, "MinigameFeature", "BossFight(TwitchChatter)", false, "!raid");
            }

            return(DateTime.Now);
        }
コード例 #19
0
 public BossFightProgressionOLD()
 {
     BossFight = new BossFight();
     Killed    = false;
 }
コード例 #20
0
    };                                                               // Maybe Randomly implement this
    // Start is called before the first frame update

    void Start()
    {
        timer         = 0;
        rounds        = BossFight.First;
        player_script = gm.player.GetComponent <PlayerData>();
    }
コード例 #21
0
 public BossFightProgressionOLD(BossFight bossFight, bool killed)
 {
     BossFight = bossFight;
     Killed    = killed;
 }
コード例 #22
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        bool hell = false;

        //collision with ff
        FerrofluidScript goo          = collision.gameObject.GetComponent <FerrofluidScript> ();
        HealthScript     playerHealth = GetComponent <HealthScript> ();
        FloorScript      floor        = collision.gameObject.GetComponent <FloorScript> ();
        PopUpScript      popUp        = collision.gameObject.GetComponent <PopUpScript> ();
        BossFight        boss         = collision.gameObject.GetComponent <BossFight> ();
        ShieldScript     shield       = collision.gameObject.GetComponent <ShieldScript> ();
        ShieldNumber     shieldnumber = collision.gameObject.GetComponent <ShieldNumber> ();
        FfScript         ffBottle     = collision.gameObject.GetComponent <FfScript> ();
        WingsCounter     wings        = collision.gameObject.GetComponent <WingsCounter> ();
        RobotArm         robot        = GetComponent <RobotArm> ();
        OrangeCell       orangeCell   = collision.gameObject.GetComponent <OrangeCell>();
        RedCell          redCell      = collision.gameObject.GetComponent <RedCell>();
        BlueCell         blueCell     = collision.gameObject.GetComponent <BlueCell>();
        MetalCell        metalCell    = collision.gameObject.GetComponent <MetalCell>();
        MazePlatform     maze         = collision.gameObject.GetComponent <MazePlatform>();


        //BridgePlatformScript bridge = GetComponent<BridgePlatformScript> ();

        if (collision.gameObject.tag == "orange")
        {
//			damagePlayer = true;
//			Debug.Log("shield not hit");
//			if(playerHealth != null)
//				playerHealth.Damage(orangeCell.damage,respawnPosX,respawnPosY,false);

            if (shieldGO.activeSelf == true)
            {
                damagePlayer = false;
                shieldHits--;
                metalCell.hitByShield = true;
                Debug.Log("shield hit");
                //orangeCell = null;
                if (playerHealth != null)
                {
                    playerHealth.Damage(orangeCell.damage, respawnPosX, respawnPosY, true);
                }
            }
            else
            {
                damagePlayer = true;
                Debug.Log("shield not hit");
                if (playerHealth != null)
                {
                    playerHealth.Damage(orangeCell.damage, respawnPosX, respawnPosY, false);
                }
            }
        }

        if (collision.gameObject.tag == "red")
        {
            damagePlayer = true;
            Debug.Log("shield not hit");
            if (playerHealth != null)
            {
                playerHealth.Damage(redCell.damage, respawnPosX, respawnPosY, false);
            }
        }

        if (collision.gameObject.tag == "blue")
        {
            damagePlayer = true;
            Debug.Log("shield not hit");
            if (playerHealth != null)
            {
                playerHealth.Damage(blueCell.damage, respawnPosX, respawnPosY, false);
            }
        }

        if (collision.gameObject.tag == "metal")
        {
            //			damagePlayer = true;
            //			Debug.Log("shield not hit");
            //			if(playerHealth != null)
            //				playerHealth.Damage(orangeCell.damage,respawnPosX,respawnPosY,false);

            if (shieldGO.activeSelf == true)
            {
                damagePlayer = false;
                shieldHits--;
                metalCell.hitByShield = true;
                Debug.Log("shield hit");
            }
            else
            {
                damagePlayer = true;
                Debug.Log("shield not hit");
                if (playerHealth != null)
                {
                    playerHealth.Damage(orangeCell.damage, respawnPosX, respawnPosY, false);
                }
            }
        }


        if (floor != null)
        {
            damagePlayer = true;
            hell         = true;
        }


        if (hell)
        {
            if (playerHealth != null)
            {
                playerHealth.Damage(floor.damage, respawnPosX, respawnPosY, false);
            }
        }
        if (collision.gameObject.name == "Checkpoint1")
        {
            CheckpointScript checkpoint = collision.gameObject.GetComponent <CheckpointScript>();
            respawnPosX = checkpoint.posX;
            respawnPosY = checkpoint.posY;
            Destroy(collision.gameObject.GetComponent <Collider2D>());
        }
        if (collision.gameObject.name == "Checkpoint2")
        {
            CheckpointScript checkpoint = collision.gameObject.GetComponent <CheckpointScript>();
            respawnPosX = checkpoint.posX;
            respawnPosY = checkpoint.posY;
            Destroy(collision.gameObject.GetComponent <Collider2D>());
        }
        if (collision.gameObject.name == "Checkpoint3")
        {
            CheckpointScript checkpoint = collision.gameObject.GetComponent <CheckpointScript>();
            respawnPosX = checkpoint.posX;
            respawnPosY = checkpoint.posY;
            Destroy(collision.gameObject.GetComponent <Collider2D>());
        }
        if (collision.gameObject.name == "Checkpoint4")
        {
            CheckpointScript checkpoint = collision.gameObject.GetComponent <CheckpointScript>();
            respawnPosX = checkpoint.posX;
            respawnPosY = checkpoint.posY;
            Destroy(collision.gameObject.GetComponent <Collider2D>());
        }

//		if (collision.gameObject.name == "atomo") {
//			popUp.showPopUp = true;
//			popUp.gameObject.GetComponent<Renderer>().enabled = false;
//			Destroy(popUp.gameObject.GetComponent<Collider2D>());
//		}

        if (collision.gameObject.tag == "MovingPlatform")
        {
            this.transform.parent = collision.transform;
        }

//		if (collision.gameObject.tag == "lever"){
//			RobotArm.move = true;
//		}
//
//		if (collision.gameObject.tag == "lever1") {
//			RobotArm.move1 = true;
//		}

        if (collision.gameObject.tag == "Boss")
        {
            boss.gameObject.GetComponent <Renderer>().enabled = true;

            showPopUp = true;
            maxSpeed  = 0;

            if (i == 5)
            {
                maxSpeed = 25;
                Destroy(boss.gameObject);
                boss.gameObject.GetComponent <Renderer>().enabled = false;
            }
        }

        if (collision.gameObject.tag == "Door")
        {
            Application.LoadLevel("Hidrofobia");
        }

        if (wings != null)
        {
            wings.GetComponent <Renderer>().enabled          = false;
            wings.GetComponent <PolygonCollider2D>().enabled = false;
            wingsCounter = 7;
        }

        if (collision.gameObject.tag == "shield")
        {
            ShieldCounterManager.AddShield(shieldnumber.shieldNumber);
            Destroy(shieldnumber.gameObject);
            shieldFlag = true;
            Debug.Log("Shield available");
        }


        if (collision.gameObject.tag == "ffbottle")
        {
            FfCounterManager.AddFF(ffBottle.ffNumber);
            gunFlag = true;
            Destroy(ffBottle.gameObject);
        }

        //platform activator
        if (collision.gameObject.tag == "ActivatePlatform")
        {
            collision.gameObject.GetComponent <Animator>().enabled = true;
        }

        if (collision.gameObject.tag == "Boots")
        {
            collision.gameObject.GetComponent <Renderer>().enabled          = false;
            collision.gameObject.GetComponent <PolygonCollider2D>().enabled = false;
            time = 5;
        }

        if (collision.gameObject.tag == "box")
        {
            bool          founded = false;
            BoxController box     = collision.gameObject.GetComponent <BoxController>();
            box.Founded(true);
            Destroy(collision.gameObject);
        }

        if (collision.gameObject.tag == "Bridge1")
        {
            BridgePlatformScript.bridge1 = true;
        }
        if (collision.gameObject.tag == "Bridge2")
        {
            BridgePlatformScript.bridge2 = true;
        }
        if (collision.gameObject.tag == "Bridge3")
        {
            BridgePlatformScript.bridge3 = true;
        }
        if (collision.gameObject.tag == "Bridge4")
        {
            BridgePlatformScript.bridge4 = true;
        }
        if (collision.gameObject.tag == "Bridge5")
        {
            BridgePlatformScript.bridge5 = true;
        }
        if (collision.gameObject.tag == "Bridge6")
        {
            BridgePlatformScript.bridge6 = true;
        }
        if (collision.gameObject.tag == "Bridge7")
        {
            BridgePlatformScript.bridge7 = true;
        }
        if (collision.gameObject.name == "MetallicFloorFerroFluidMAP 159")
        {
            MazePlatform.ground = true;
            transform.parent    = collision.transform;
        }
    }
コード例 #23
0
 private void Dead()
 {
     EndManager.GetComponent <EndRoom>().RoomOver();
     rounds = BossFight.Done;
 }
コード例 #24
0
ファイル: CharacterCollision.cs プロジェクト: JMounier/Aegina
 // Use this for initialization
 void Start()
 {
     this.controllerScript = gameObject.GetComponentInParent<Controller>();
     this.inventoryScript = gameObject.GetComponentInParent<Inventory>();
     this.bossFight = gameObject.GetComponentInParent<BossFight>();
 }