public void CursePlayer(GameObject player, CurseType curse) { switch (curse) { case CurseType.Slippery: Instantiate(curseSlippery, player.transform); break; case CurseType.InvertMovementX: Instantiate(curseInvertMovementX, player.transform); break; case CurseType.InvertMovementY: Instantiate(curseInvertMovementY, player.transform); break; case CurseType.InvertMovements: Instantiate(curseInvertMovements, player.transform); break; case CurseType.MoveSpeedIncrease: Instantiate(curseMoveSpeedIncrease, player.transform); break; case CurseType.MoveSpeedDecrease: Instantiate(curseMoveSpeedDecrease, player.transform); break; default: break; } }
private void CreateRandomCurse() { m_RandomNumer = Random.Range(0, 4); switch (m_RandomNumer) { case 0: m_CurrentCurseType = CurseType.Bounce; m_RunTime = m_RunTimeBounce; break; case 1: m_CurrentCurseType = CurseType.InverseControls; m_RunTime = m_RunTimeInverseControl; break; case 2: m_CurrentCurseType = CurseType.Paralyse; m_RunTime = m_RunTimeParalyse; break; case 3: m_CurrentCurseType = CurseType.SpeedDown; m_RunTime = m_RunTimeSpeedDown; break; default: break; } this.GetComponent <MeshRenderer>().enabled = true; this.GetComponent <SphereCollider>().enabled = true; }
public Cursed(int Turns, CombatWindow cw, CurseType Type, int degree) { turns = Turns; window = cw; type = Type; strength = degree; if (isPlayer) cw.combatText.AppendText(p.name + " has placed a(n) " + Type + " Curse on " + e.name + " for " + turns + " turns!", "Red"); else cw.combatText.AppendText(e.name + " has placed a(n) " + Type + " Curse on " + p.name + " for " + turns + " turns!", "Aqua"); }
public Cursed(int Turns, CurseType Type, int degree) { turns = Turns; type = Type; strength = degree; if (isPlayer) { window.combatText.AppendText(p.name + " has placed a(n) " + Type + " Curse on " + e.name + " for " + turns + " turns!", "Red"); } else { window.combatText.AppendText(e.name + " has placed a(n) " + Type + " Curse on " + p.name + " for " + turns + " turns!", "Aqua"); } }
public override string GetName(int index, CurseType curse = CurseType.None) { return(string.Empty); }
public virtual string GetName(Enum target, CurseType curse = CurseType.None) { return GetName(Math.Abs((int) (object) target), curse); }
public virtual string GetName(int index, CurseType curse = CurseType.None) { return index < Names.GetLength(0) ? Names[Math.Abs(index), curse > CurseType.Unrevealed ? 1 : 0] : string.Empty; }
public Curse(int id, CurseType type) { Id = id; Type = type; Texture = IslandsCurses.Textures["curses"]; }