示例#1
0
 //
 public override bool performToolAction(Tool t, GameLocation location)
 {
     CCubesCore.logger.Info("Hi!");
     Game1.playSound("woodWhack");
     RewardRegistry.triggerRandomReward(tileLocation, Game1.player);
     return(true);
 }
        public override void Entry(IModHelper helper)
        {
            RewardRegistry.initRewards();

            /*  Gets the texture that we will use for the Chance Cube. It feels weird to do it here,
             *  but this is how the example i was following did it.
             */
            chanceCubeTexture  = this.Helper.Content.Load <Texture2D>("assets/chance_cube.png");
            ChanceCube.texture = this.chanceCubeTexture;

            logger = new Log(this);

            InitEvents(helper.Events);

            helper.Content.AssetEditors.Add(new CCubesInjector());

            CustomRewardsLoader.LoadCustomRewards(helper.Data, helper.DirectoryPath);

            logger.Info("Death and destruction prepared! (And Cookies. Cookies were also prepared.)");
        }