WeiWeiXinNet/Games/game6/farming.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//set main namespace 
goog.provide('farming');   
//get requirements 
goog.require('lime.Director'); 
goog.require('lime.Scene'); 
goog.require('lime.Layer');   
goog.require('lime.GlossyButton');   
goog.require('farming.Land');   

//entrypoint 
farming.start = function(){     
    
    //game object
    var gameObj = {
        width: 320,
        height: 480,
        tile_size: 64,
        num_tiles_x: 5,
        num_tiles_y: 6,
        landLayer_w: 64*5, 
        landLayer_h: 64*6,
        controlsLayer_w: 64*5,
        controlsLayer_h: 64*1.5,
        costPlowing: 5,
        
        //shop
        shop_margin_x: 50,
        shop_margin_y: 20
    }
    
    //player object
    var playerObj = {
        money: 300,
        currentCrop: 0     
    }
    
    //crops
    gameObj.crops = [
        {
            name: 'tomato',
            cost: 10,
            revenue: 18,
            time_to_ripe: 10, //secods
            time_to_death: 30, //second from when it's ripe
            image: 'tomato.png'
        },
        {
            name: 'artichoke',
            cost: 20,
            revenue: 38,
            time_to_ripe: 60,
            time_to_death: 60,
            image: 'artichoke.png'
        },
        {
            name: 'lettuce',
            cost: 15,
            revenue: 26,
            time_to_ripe: 30,
            time_to_death: 60,

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。