public void CorgiCanBrushSelf() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.BrushSelf(); Assert.Equal("The " + testCorgi.AnimalName + " is brushing their own coat.", testMessage); }
public void Start(Corgi _corgi) { corgi = _corgi; var path = Path.Combine(Application.persistentDataPath, INIT_DATA_PATH); if (!File.Exists(path)) { return; } var content = File.ReadAllText(path); if (string.IsNullOrEmpty(content)) { return; } var initData = JsonConvert.DeserializeObject <CorgiDiskData>(content); if (initData == null) { return; } chunkData = initData.chunkData; chunkPriorityQueue = initData.chunkPriorityQueue; capacity = initData.capacity; useSize = initData.useSize; }
public void CorgiCanEat() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Eat(); Assert.Equal("The " + testCorgi.AnimalName + " is eating some kibble.", testMessage); }
public void CorgiCanFlop() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Flop(); Assert.Equal("The corgi flops on the ground.", testMessage); }
public void CorgiCanWalk() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Walk(); Assert.Equal("Please walk the " + testCorgi.AnimalName + ".", testMessage); }
public void CorgiCanBark() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Bark(); Assert.Equal("The " + testCorgi.AnimalName + " barks quietly.", testMessage); }
void Start() { ChangeImageIndex(0); button.onClick.AddListener(NextUrl); Corgi.Memorize(urls.Select(x => new CorgiMemorize() { url = x, version = 0 }).ToList()); }
public void AnimalCanWalkFromCorgi() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Walk(); Animal testAnimal = new Corgi(); string animalMessage = testAnimal.Walk(); Assert.Equal(animalMessage, testMessage); }
public void MammalCanBrushSelfFromCorgi() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.BrushSelf(); Mammal testMammal = new Corgi(); string mammalMessage = testMammal.BrushSelf(); Assert.Equal(mammalMessage, testMessage); }
public void DogCanEatFromCorgi() { Corgi testCorgi = new Corgi(); string testMessage = testCorgi.Eat(); Dog testDog = new Corgi(); string dogMessage = testDog.Eat(); Assert.Equal(dogMessage, testMessage); }
public void CorgiCanGrowSecondCoatBrushSelf() { Corgi testCorgi = new Corgi(); testCorgi.HasTwoCoats = true; string testMessage = testCorgi.BrushSelf(); Assert.Equal("The " + testCorgi.AnimalName + " is brushing their own coat. The " + testCorgi.AnimalName + "'s second coat sheds.", testMessage); }
void ChangeImageIndex(int _index) { if (index == _index) { return; } button.enabled = false; index = _index; startTime = DateTime.Now; Corgi.Fetch(urls[index], 0, OnFetchDone); Corgi.Fallback(OnFetchFailed); }
static void Main(string[] args) { GermanShepherd gshepherd = new GermanShepherd(); Corgi corgi = new Corgi(); Dog corgi1 = new Corgi(); Lablador lablador = new Lablador(); Console.WriteLine("Germanshepherd-Szczekanie:" + gshepherd.Bark() + " Warczenie:" + gshepherd.Growl()); Console.WriteLine("Corgi:" + corgi.Bark()); Console.WriteLine("Inny typ:" + corgi1.Bark()); Console.WriteLine("Lablador-Szczekanie:" + lablador.Bark() + " Warczenie:" + lablador.Growl()); Console.ReadKey(); }
static void Main(string[] args) { GermanShepherd shepherd = new GermanShepherd(); Corgi corgi = new Corgi(); Dog corgi1 = new Corgi(); Puppy puppy = new Puppy(); Console.WriteLine("Germanshepherd-Szczekanie:" + shepherd.Bark() + " Warczenie:" + shepherd.Growl()); Console.WriteLine("Typ Corgi:" + corgi.Bark()); Console.WriteLine("Inny typ:" + corgi1.Bark()); Console.WriteLine("Szczeniak:" + "Warczenie:" + puppy.Growl() + " Szczekanie:" + puppy.Bark()); Console.ReadKey(); }
void Awake() { if (_instance == null) { _instance = this; } DontDestroyOnLoad(this); corgiLayers = new List <ICorgiLayer>() { new CorgiMemory(), new CorgiDisk(), new CorgiWeb() }; foreach (var corgiLayer in corgiLayers) { corgiLayer.Start(this); } }
void Awake() { if (_instance == null) { _instance = this; } DontDestroyOnLoad(this); mainThreadId = Thread.CurrentThread.ManagedThreadId; handles = new Dictionary <string, CacheHandle>(); mainThreadTasks = new List <Action>(); disk = gameObject.AddComponent <CorgiDisk>(); memory = gameObject.AddComponent <CorgiMemory>(); web = gameObject.AddComponent <CorgiWeb>(); var path = Path.Combine(Application.persistentDataPath, IndexFilename); if (!File.Exists(path)) { return; } var content = File.ReadAllText(path); Debug.Log("Awake Data" + content); if (string.IsNullOrEmpty(content)) { return; } var initData = JsonConvert.DeserializeObject <CorgiDiskData>(content); if (initData == null) { return; } disk.Init(initData); }
static void Main(string[] args) { Console.WriteLine("Hello World!"); Corgi ein = new Corgi(); Samoyed sam = new Samoyed(); Pidgeon pete = new Pidgeon(); Eagle ethan = new Eagle(); Snake sal = new Snake(); Dragon dan = new Dragon(); Console.WriteLine("Meet Ein the " + ein.AnimalName + "."); ein.Eat(); ein.Sleep(); ein.Walk(); ein.BrushSelf(); ein.Bark(); ein.Flop(); Console.WriteLine("\nMeet Sam the " + sam.AnimalName + "."); sam.Eat(); sam.Sleep(); sam.Walk(); sam.BrushSelf(); sam.Bark(); sam.SamoyedEat(); sam.RollOver(); Console.WriteLine("\nMeet Pete the " + pete.AnimalName + "."); pete.Eat(); pete.Sleep(); pete.Walk(); pete.Flap(); pete.TakeOff(); pete.TakeOff(); pete.Land("home"); pete.Land("elseswhere"); pete.Coo(); Console.WriteLine("\nMeet Ethan the " + ethan.AnimalName + "."); ethan.Eat(); ethan.Sleep(); ethan.Walk(); ethan.Flap(); ethan.Hunt("snake"); ethan.TakeOff(); ethan.Land("the zoo"); Console.WriteLine("\nMeet Sal the " + sal.AnimalName + "."); sal.StopHibernating(); sal.Eat(); sal.Sleep(); sal.Walk(); sal.Firebreath(); sal.StartHibernating(); sal.StopHibernating(); Console.WriteLine("\nFinally, meet Dan the " + dan.AnimalName + "."); dan.Eat(); dan.Sleep(); dan.Walk(); dan.Firebreath(); dan.Fly(); dan.TakeOff(); dan.Land("your car"); dan.StartHibernating(); Console.WriteLine("\nThank you for visiting the zoo."); }
public void Start(Corgi _corgi) { corgi = _corgi; }