コード例 #1
0
 public MonsterSyncData(ushort objID, ushort hp, float xPos, float zPos, float yRot, float wRot, byte anime, BuffDebuff buff) : base(objID, hp)
 {
     this.xPos  = xPos;
     this.zPos  = zPos;
     this.yRot  = yRot;
     this.wRot  = wRot;
     this.anime = anime;
     this.buff  = buff;
 }
コード例 #2
0
 public static CoreSyncData ReadData(NetIncomingMessage message)
 {
     return(new CoreSyncData(
                message.ReadUInt16(),
                message.ReadUInt16(),
                BuffDebuff.ReadData(message),
                EnemyVision.ReadData(message)
                ));
 }
コード例 #3
0
 public static MonsterSyncData ReadData(NetIncomingMessage message)
 {
     return(new MonsterSyncData(
                message.ReadUInt16(),
                message.ReadUInt16(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadByte(),
                BuffDebuff.ReadData(message)
                ));
 }
コード例 #4
0
ファイル: MinionSyncData.cs プロジェクト: yasgamesdev/MyMOBA
 public static MinionSyncData ReadData(NetIncomingMessage message)
 {
     return(new MinionSyncData(
                message.ReadUInt16(),
                message.ReadUInt16(),
                message.ReadByte(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadFloat(),
                message.ReadByte(),
                BuffDebuff.ReadData(message),
                EnemyVision.ReadData(message)
                ));
 }
コード例 #5
0
    public void MagneticField()
    {
        GameObject mag         = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
        Collider   magCollider = mag.GetComponent <Collider>();

        magCollider.isTrigger = true;

        mag.transform.localScale = new Vector3(magRadius, magHeight, magRadius);
        Destroy(mag.GetComponent <MeshRenderer>());
        mag.transform.parent        = gameObject.transform;
        mag.transform.localPosition = Vector3.zero;
        BuffDebuff magComponent = mag.AddComponent <BuffDebuff>();

        magComponent.speedAmount = magRate;

        Destroy(mag, magTime);
    }
コード例 #6
0
    //Return the equivalent of this modified by debuff mod
    public CasterStats modify(BuffDebuff mod)
    {
        float atk   = attack * mod.Attack;
        float def   = defense * mod.Defense;
        float spd   = speed * mod.Speed;
        float acc   = accuracy * mod.Accuracy;
        int   evade = Mathf.FloorToInt(evasion * mod.Evasion);

        float[] vE;
        vE = new float[Elements.count];

        for (int i = 0; i < Elements.count; i++)
        {
            vE[i] = mod.modElementState(vsElement[i], i);
        }

        return(new CasterStats(name, chatDatabaseID, max_hp, max_shield, max_stagger, atk, def, spd, acc, evade, vE));
    }
コード例 #7
0
    public void HealArea()
    {
        GameObject heal         = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
        Collider   healCollider = heal.GetComponent <Collider>();

        healCollider.isTrigger = true;

        heal.transform.localScale = new Vector3(healRadius, healHeight, healRadius);
        Destroy(heal.GetComponent <MeshRenderer>());
        heal.transform.parent        = gameObject.transform;
        heal.transform.localPosition = Vector3.zero;
        BuffDebuff healComponent = heal.AddComponent <BuffDebuff>();

        healComponent.healAmount = healRate;
        healComponent.teamNum    = GetComponent <JPShip>().teamNum;

        Destroy(heal, healTime);
    }
コード例 #8
0
    public void updateBuff(string name, float time)
    {
        switch (name)
        {
        case "water-slow":
            if (buffDebuffMap.ContainsKey(name))
            {
                buffDebuffMap[name].TimeLeft = time;
            }
            else
            {
                buffDebuffMap[name] = new BuffDebuff(time);
                thirdPersonMovement.ChangeSpeed(0.7f);
            }
            break;

        default:
            print("BUFF " + name + " NOT FOUND");
            break;
        }
    }
コード例 #9
0
    // Start is called before the first frame update
    void Start()
    {
        BaseStats();

        timer     = 0;
        tempTimer = .5f;

        seenEnemies = new bool[50];
        for (int i = 0; i < 50; i++)
        {
            seenEnemies[i] = true;
        }

        prevRoom = 0;

        minimap = GameObject.FindGameObjectWithTag("Minimap");

        floor    = 1;
        prevRoom = 0;

        tempDisplayTimer = 2f;
        displayTimer     = 0f;

        emptySkill = GameObject.FindGameObjectWithTag("EmptySkill").GetComponent <Skill>();

        learnedSkills    = new Skill[12];
        learnedSkills[0] = learnSet[0];
        for (int i = 1; i < learnedSkills.Length; i++)
        {
            learnedSkills[i] = emptySkill;
        }

        levelUpText = GameObject.FindGameObjectWithTag("LevelUpText");

        emptyBuff = GameObject.FindGameObjectWithTag("EmptyBuff").GetComponent <BuffDebuff>();
        buffs     = new BuffDebuff[8];
        for (int i = 0; i < buffs.Length; i++)
        {
            buffs[i] = emptyBuff;
        }

        bossesBeat = new bool[2];
        for (int i = 0; i < bossesBeat.Length; i++)
        {
            bossesBeat[i] = false;
        }

        miniBossesBeat = new bool[5];
        for (int i = 0; i < miniBossesBeat.Length; i++)
        {
            miniBossesBeat[i] = false;
        }

        GameObject tooltip = GameObject.FindGameObjectWithTag("Tooltip");

        tooltip.SetActive(false);

        SelectionModule selectionModule = GameObject.FindGameObjectWithTag("Selection Module").GetComponent <SelectionModule>();

        selectionModule.gameObject.SetActive(false);

        SkillSelect selectionModule2 = GameObject.FindGameObjectWithTag("SkillSelect").GetComponent <SkillSelect>();

        selectionModule2.gameObject.SetActive(false);
    }
コード例 #10
0
 public CoreSyncData(ushort objID, ushort hp, BuffDebuff buff, EnemyVision vision) : base(objID, hp)
 {
     this.buff   = buff;
     this.vision = vision;
 }
コード例 #11
0
 //Just get debuff modified ACCURACY
 public float getModAcc(BuffDebuff mod)
 {
     return(accuracy * mod.Accuracy);
 }
コード例 #12
0
 //Just get debuff modified EVADE
 public int getModEvade(BuffDebuff mod)
 {
     return(Mathf.FloorToInt(evasion * mod.Evasion));
 }
コード例 #13
0
ファイル: HeroSyncData.cs プロジェクト: yasgamesdev/MyMOBA
 public HeroSyncData(ushort objID, ushort hp, ushort mp, float xPos, float zPos, float yRot, float wRot, byte anime, byte level, ushort gold, Items items, BuffDebuff buff, EnemyVision vision) : base(objID, hp)
 {
     this.mp     = mp;
     this.xPos   = xPos;
     this.zPos   = zPos;
     this.yRot   = yRot;
     this.wRot   = wRot;
     this.anime  = anime;
     this.level  = level;
     this.gold   = gold;
     this.items  = items;
     this.buff   = buff;
     this.vision = vision;
 }
コード例 #14
0
ファイル: MinionSyncData.cs プロジェクト: yasgamesdev/MyMOBA
 public MinionSyncData(ushort objID, ushort hp, byte faction, float xPos, float zPos, float yRot, float wRot, byte anime, BuffDebuff buff, EnemyVision vision) : base(objID, hp)
 {
     this.faction = faction;
     this.xPos    = xPos;
     this.zPos    = zPos;
     this.yRot    = yRot;
     this.wRot    = wRot;
     this.anime   = anime;
     this.buff    = buff;
     this.vision  = vision;
 }
コード例 #15
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Enemy")
        {
            AudioSource.PlayClipAtPoint(exorcistDamagedAudio, transform.position);
            currentHealth--;
        }

        if (collision.gameObject.tag == "Item")
        {
            HighScore.score += 50;
            Destroy(collision.gameObject);
            var rnd  = new System.Random();
            var tick = rnd.Next(1, 5);
            if (tick == 1)
            {
                Debug.Log("healthBuff");
                if (currentHealth < 5)
                {
                    BuffManager.healthBuff = true;
                    BuffDebuff.UpdateText("Player Health Buff");
                }
                else
                {
                    tick = 2;
                }
            }
            if (tick == 2)
            {
                Debug.Log("movementBuff");

                if (!BuffManager.movementBuff)
                {
                    BuffManager.movementBuff = true;
                    BuffDebuff.UpdateText("Player Movement Buff");
                }
                else
                {
                    tick = 3;
                }
            }
            if (tick == 3)
            {
                Debug.Log("highScoreBuff");

                if (!BuffManager.highScoreBuff)
                {
                    BuffManager.highScoreBuff = true;
                    BuffDebuff.UpdateText("High Score Buff");
                }
                else
                {
                    tick = 4;
                }
            }
            if (tick == 4)
            {
                Debug.Log("fireRateBuff");

                if (!BuffManager.fireRateBuff)
                {
                    BuffManager.fireRateBuff = true;
                    BuffDebuff.UpdateText("Player Fire Rate Buff");
                }
                else
                {
                    BuffManager.buffCounter += 1;
                }
            }
        }

        if (collision.gameObject.tag == "ShovelProjectile")
        {
            Destroy(collision.gameObject);
            currentHealth--;
        }
    }
コード例 #16
0
 public float getFloatVsElement(BuffDebuff mod, int element)
 {
     return(mod.modElementState(vsElement[element], element));
 }
コード例 #17
0
 public Elements.vsElement getModVsElement(BuffDebuff mod, int element)
 {
     return(mod.modElementLevel(vsElement[element], element));
 }
コード例 #18
0
ファイル: LevelChanger.cs プロジェクト: vzilinas/final-bwaaa
    void Update()
    {
        var rnd  = new System.Random();
        var tick = rnd.Next(1, 6);

        m_MyGameObject = GameObject.Find("Exorcist");

        // Press the space key to add the Scene additively and move the GameObject to that Scene
        if (previous)
        {
            if (tick == 1)
            {
                Debug.Log("playerHealthDebuff");
                if (m_MyGameObject.GetComponent <ExorcistController>().currentHealth < 1)
                {
                    BuffManager.playerHealthDebuff = true;
                    BuffDebuff.UpdateText("Player Health Debuff");
                }
                else
                {
                    tick = 2;
                }
            }
            if (tick == 2)
            {
                Debug.Log("playerMovementDebuff");
                if (!BuffManager.playerMovementDebuff)
                {
                    BuffManager.playerMovementDebuff = true;
                    BuffDebuff.UpdateText("Player Movement Debuff");
                }
                else
                {
                    tick = 3;
                }
            }
            if (tick == 3)
            {
                Debug.Log("monsterMovementBuff");
                if (!BuffManager.monsterMovementBuff)
                {
                    BuffManager.monsterMovementBuff = true;
                    BuffDebuff.UpdateText("Monster Movement Buff");
                }
                else
                {
                    tick = 4;
                }
            }
            if (tick == 4)
            {
                Debug.Log("highscoredebuff");
                if (!BuffManager.highScoreDebuff)
                {
                    BuffManager.highScoreDebuff = true;
                    BuffDebuff.UpdateText("High Score Debuff");
                }
                else
                {
                    tick = 4;
                }
            }
            if (tick == 5)
            {
                Debug.Log("visibility");
                if (!BuffManager.visibilityDebuff)
                {
                    BuffManager.visibilityDebuff = true;
                    BuffDebuff.UpdateText("Player Visibility Debuff");
                }
                else
                {
                    BuffManager.debuffCounter += 1;
                }
            }
            previous = false;
            m_Scene  = previousScene;
            StartCoroutine(LoadYourAsyncScene());
        }
        else if (next)
        {
            next    = false;
            m_Scene = nextScene;
            StartCoroutine(LoadYourAsyncScene());
        }
    }
コード例 #19
0
 public void DisplayText()
 {
     gameObject.GetComponent <Text>().text = BuffDebuff.GetDisplayText();
 }