コード例 #1
0
ファイル: Minifigure.cs プロジェクト: jeressia/Legos
 public void Battle()
 {
     _head.Talk();
     _torso.Flex();
     _torso.Fight();
     _legs.Kick();
 }
コード例 #2
0
 public void DoYourJob(int stepsToWalk)
 {
     Console.WriteLine($"{Name} is doing all their {Job} duties...");
     Legs.Walk(stepsToWalk);
     Head.EatPie("Cherry");
     Torso.Flex();
     Legs.Walk(stepsToWalk);
 }
コード例 #3
0
        //public SpaceGuy(string v1, string v2, ZoeHead head, AstronautTorso torso, AstronautLegs legs)
        //{
        //    this.v1 = v1;
        //    this.v2 = v2;
        //    this.head = head;
        //    this.torso = torso;
        //    this.legs = legs;
        //}

        public void DoYourJob(int stepsToWalk)
        {
            Console.WriteLine($"Here I am. Doing all my {Job} duties... definitely being a very effective {Job}.");
            Legs.Walk(stepsToWalk);
            Head.EatPie("Cherry");
            Torso.Flex();
            Legs.Walk(stepsToWalk);
        }
コード例 #4
0
 public void DoYourJob()
 {
     Console.WriteLine($"{Name} is doing all of their {Job} duties...");
     Legs.Walk(15);
     Head.EatPie("Cherry");
     Torso.Flex();
     Legs.Walk(10);
 }
コード例 #5
0
 public void Battle()
 {
     _legs.Walk();
     _talker.Talk();
     _torso.Flex();
     _torso.Fight();
     _legs.Kick();
 }
コード例 #6
0
ファイル: Astronaut.cs プロジェクト: aclai4067/LegoMinifigure
 public void DoYourJob()
 {
     Console.WriteLine($"{Name} is doing all their {Job} duties...");
     Legs.Walk(15);
     Head.EatPie("pumpkin");
     Torso.Flex(); // because we are using TorsoBase, can only call common methods from the base. Can't use ChangeThermostat();
     Legs.Walk(10);
 }