Ejemplo n.º 1
0
 void OnTriggerExit(Collider other)
 {
     if (other.gameObject.tag == "Player" || other.gameObject.tag == "Boulder")
     {
         if (isClear)
         {
             if (thingToMove.CompareTag("MovingPlatform"))
             {
                 vertPlat          = GameObject.FindGameObjectWithTag("MovingPlatform").GetComponent <VerticalPlatform>();
                 vertPlat.isMoving = false;
                 isClear           = false;
             }
             else
             {
                 isClear = false;
                 thingToMove.SetActive(true);
             }
         }
     }
 }
Ejemplo n.º 2
0
        public static void ClassInit(TestContext context)
        {
            //Textures used don't matter, as none of them are initialized
            Player        = new Player(Vector2.Zero);
            PrivatePlayer = new PrivateObject(Player);
            Enemy         = new BaseEnemy(Vector2.Zero);
            PrivateEnemy  = new PrivateObject(Enemy);

            Platform             = new Platform(Vector2.Zero);
            PrivatePlatform      = new PrivateObject(Platform);
            SpikePlatform        = new SpikePlatform(Vector2.Zero);
            PrivateSpikePlatform = new PrivateObject(SpikePlatform);
            HorizontalPlatform   = new HorizontalPlatform(Vector2.Zero);
            PrivateHorizontal    = new PrivateObject(HorizontalPlatform);
            VerticalPlatform     = new VerticalPlatform(Vector2.Zero);
            PrivateVertical      = new PrivateObject(VerticalPlatform);
            IcePlatform          = new IcePlatform(Vector2.Zero);
            PrivateIcePlatform   = new PrivateObject(IcePlatform);
            CloudPlatform        = new CloudPlatform(Vector2.Zero);
            PrivateCloudPlatform = new PrivateObject(CloudPlatform);
        }