Beispiel #1
0
        /// <summary>
        /// Constructor for the Platform Class
        /// </summary>
        /// /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public Platform(platformType Type, Vector2 Position)
        {
            position = Position;
            switch (Type)
            {
            case platformType.Block:
                texture = Game1.content.Load <Texture2D>(@"Level\Block");
                break;

            case platformType.Floor:
                texture = Game1.content.Load <Texture2D>(@"Level\Floor");
                break;

            case platformType.Platform:
                texture = Game1.content.Load <Texture2D>(@"Level\Platform");
                break;

            default:
                System.Console.WriteLine("Platform texture Not loaded Properly");
                break;
            }
            type        = Type;
            boundingBox = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
            updateBoundingBox();
        }
    // Use this for initialization
    void Start()
    {
    #if UNITY_EDITOR
        platform = platformType.PC;
    #elif UNITY_ANDROID || UNITY_IPHONE
        platform = platformType.MOBILE;
    #endif

        basePostion             = this.transform.position;
        Input.multiTouchEnabled = true;//开启多点触碰
        init();
    }
        public static bool CreateNewSettings(string apiKey, string gameVersion, platformType platform, bool onDevelopmentMode, string domainKey, DebugLevel debugLevel = DebugLevel.Off, bool allowTokenRefresh = false)
        {
            settingsInstance = Resources.Load <LootLockerConfig>("Config/LootLockerConfig");

            if (settingsInstance == null)
            {
                settingsInstance = CreateInstance <LootLockerConfig>();
            }

            settingsInstance.apiKey            = apiKey;
            settingsInstance.game_version      = gameVersion;
            settingsInstance.platform          = platform;
            settingsInstance.developmentMode   = onDevelopmentMode;
            settingsInstance.currentDebugLevel = debugLevel;
            settingsInstance.allowTokenRefresh = allowTokenRefresh;
            settingsInstance.domainKey         = domainKey;

            return(true);
        }
 public FileHandler()
 {
     platform = platformType.Windows;
     LoadLoggerConfig();
 }
 /// <summary>
 /// Need to use an instance of the FileHandler object for reasons such as:
 /// Xamarin didn't like the static methods.
 /// </summary>
 /// <param name="type"></param>
 public FileHandler(platformType type = platformType.Windows)
 {
     platform = type;
 }