예제 #1
0
        public void CanAddShields()
        {
            Outpost outpost       = new Outpost(new RftVector(_map, 0, 0), new Player(1), OutpostType.Mine);
            int     initialShield = outpost.GetShields();

            outpost.AddShield(1);
            Assert.AreEqual(initialShield + 1, outpost.GetShields());
        }
예제 #2
0
        public void CannotHaveNegativeShield()
        {
            Outpost outpost = new Outpost(new RftVector(_map, 0, 0), new Player(1), OutpostType.Mine);

            outpost.SetShields(10);
            int initialShields = outpost.GetShields();

            outpost.RemoveShields(15);
            Assert.AreEqual(0, outpost.GetShields());
        }
예제 #3
0
        public void ShieldCapacityWorks()
        {
            Outpost outpost = new Outpost(new RftVector(_map, 0, 0), new Player(1), OutpostType.Mine);

            outpost.SetShieldCapacity(100);
            outpost.SetShields(5);
            outpost.AddShield(100);

            Assert.AreEqual(outpost.GetShieldCapacity(), outpost.GetShields());

            outpost.SetShields(105);
            Assert.AreEqual(outpost.GetShieldCapacity(), outpost.GetShields());
        }
예제 #4
0
        public void CanSetShields()
        {
            Outpost outpost = new Outpost(new RftVector(_map, 0, 0), new Player(1), OutpostType.Mine);

            outpost.SetShields(1);
            Assert.AreEqual(1, outpost.GetShields());
        }
예제 #5
0
    // Update is called once per frame
    void Update()
    {
        Text text = gameObject.GetComponentInChildren <Text>();

        text.text = "====Source Outpost====\n" +
                    "Outpost Id: " + source.GetId() + "\n" +
                    "Shields: " + source.GetShields() + "\n" +
                    "Drillers: " + source.GetDrillerCount() + "\n" +
                    "Specialists: " + source.GetSpecialistManager().GetSpecialistCount();
    }