コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     StartCoroutine(SetMoves());
     //MoveId1 = Random.Range(1, 6);
     //MoveId2 = Random.Range(6, 11);
     //MoveId3 = Random.Range(11, 16);
     //MoveId4 = Random.Range(16, 21);
     name = "The Player";
     //    es = Enemy.GetComponent<EnemyScr>();
     //we are going to want to start the player off with two random moves, one to attack, one to defend
     Stuntime        = -1;
     Muck            = -1;
     IsCharacterTurn = true;
     StartAtk        = 10;
     StartDef        = 10;
     StartLuck       = 10;
     AtkText.text    = "Atk X " + Atk.ToString();
     DefText.text    = "Def X " + Def.ToString();
     LuckText.text   = "Luck X " + Luck.ToString();
     LvlText.text    = "Lvl X " + Lvl.ToString();
     ChipsText.text  = "Chips X " + Chips.ToString();
     //   MoveId1 = 0; //id for first move
     // MoveId2 = 0; //id for second move
     // MoveId3 = 0; //id for third move
     // MoveId4 = 0; //id for fourth move
 }
コード例 #2
0
 public void ShowStats()
 {
     Console.WriteLine(Name);
     Console.WriteLine("Lvl " + Lvl.ToString());
     Console.WriteLine("HP " + CurrentHP.ToString());
     Console.WriteLine("Damage " + Damage.ToString());
     Console.WriteLine("Type " + Type.ToString());
     Console.WriteLine();
 }
コード例 #3
0
ファイル: Monster.cs プロジェクト: onokoshin/TheLastHero
        public string FormatOutput()
        {
            //code below is for monster


            var myReturn = Name;

            myReturn += " , Level : " + Lvl.ToString();
            myReturn += " , Total Experience : " + ExperienceTotal;
            myReturn += " , Attack :  " + Atk;
            myReturn += " , Defense :  " + Def;
            myReturn += " , Speed :  " + Spd;
            myReturn += " , Type: " + Type;
            myReturn += " , MoveingRange: " + MoveRange;
            myReturn += " , AttackRange: " + AtkRange;

            return(myReturn);
        }
コード例 #4
0
ファイル: Character.cs プロジェクト: onokoshin/TheLastHero
        // Helper to combine the attributes into a single line, to make it easier to display the item as a string
        public string FormatOutput()
        {
            var myReturn = string.Empty;

            myReturn += Name;
            myReturn += " , Level : " + Lvl.ToString();
            myReturn += " , Total Experience : " + CurrentExp;
            myReturn += " , Attack :  " + Atk;
            myReturn += " , Defense :  " + Def;
            myReturn += " , Speed :  " + Spd;
            myReturn += " , Type: " + Type;
            myReturn += " , MoveingRange: " + MoveRange;
            myReturn += " , AttackRange: " + AtkRange;
            //Item section comes here
            myReturn += " , Items : " + EquippedItemListString;
            myReturn += ", Damage : " + totalDamage;

            return(myReturn);
        }