scene

Load scene with param variable Unity

落爺英雄遲暮 提交于 2019-12-23 08:47:48
问题 In my game there is a map view that contains a 50x50 grid of tiles. When you click on the tile you get sent to that tiles view and attack things, etc. The only difference between these "tiles" as far as the code will be concerned is the tiles ID, aka. which number on the grid. That number will be passed to the server on init to handle the rest. Obviously, with that being the only difference in tiles it would be a mistake to create a scene "1", scene "2"...scene "2500" and call SceneManager

Render multiple files in POV-Ray (Windows)

人走茶凉 提交于 2019-12-23 05:19:11
问题 I know this has been asked before, but none of the answers really helped me. So my problem is this: I have a bunch of .pov files named, XXXXX000001...., and I want to render them, but the queue thing inside of POV-Ray only lets you render 500 at a time. So, is there a way to render them all automatically? I know the answer is to write a script of some kind, but I don't know a lot about it so if you could give me a step by step instructions I would be grateful. 回答1: Create a POV-Ray .ini file

Pass object from one scene to another

谁都会走 提交于 2019-12-21 20:48:36
问题 As I'm learning the new world of JavaFX2 I stumbled on another annoying problem. I'm developing a program with multiple scenes (~10 scenes). For that I created a small class like this: public class SceneSelector { ... public void setScene(Stage stage, String fxmlfilename, ObservableList ol) throws Exception{ String s = "../" + fxmlfilename; Parent root = FXMLLoader.load(getClass().getResource(s)); root.setUserData(ol); Scene scene = new Scene(root); stage.setScene(scene); //show the stage

Cocoa: scene vs. view

我怕爱的太早我们不能终老 提交于 2019-12-20 06:26:53
问题 Noob question here. I think I get the basics of the three basic Model-View-Controller elements. Sort of. But what is a scene? I know iPad can have more than one scene per screen, and iPhone/iPod can have just one. But how does a scene relate to a view? If I'm getting it horribly wrong, please be kind :) 回答1: A "scene" is a UI abstraction Apple introduced into XCode to allow for storyboard mechanics in Interface Builder. Prior to this, in Interface Builder, you created (and still can) Views

three.js SpriteCanvasMaterial: TypeError: Cannot read property 'replace' of undefined (in render function)

与世无争的帅哥 提交于 2019-12-13 19:21:47
问题 console log info: THREE.WebGLRenderer 91dev var main3d = { scene: null, camera: null, renderer: null, init: function () { // initialize scene, camera etc. var _dotGeometry = new THREE.Geometry(); _dotGeometry.vertices.push(new THREE.Vector3(2, 4, 0)); //var _dotMaterial = new THREE.PointsMaterial({ size: 5, sizeAttenuation: false, color: 0x00ff00 }); _dotMaterial = new THREE.SpriteCanvasMaterial({ color: 0x00ff00, program: function (context) { context.beginPath(); context.arc(0, 0, 0.05, 0,

Invisible Stage/Scene in JavaFX

拜拜、爱过 提交于 2019-12-13 15:14:06
问题 I'm looking for a way to hide a JavaFX Stage or Scene. Now I know about .hide() , but that won't work. I need something that still keeps the window, but just makes it completely transparent. A good analogy is display: none and visibility: hidden in CSS. Whereas the first completely and totally removes a tag/node from the screen, the second just makes it invisible. I'd like something like visibility in JavaFX, not display (which is the hide and show methods). It also might help that my stage

How to kill a cocos2d scene directly without replacing scene

可紊 提交于 2019-12-13 06:26:12
问题 I'm starting the game with a UIViewController in this way: navController = [[MyNavigationController alloc] initWithRootViewController:myController]; and when you push the game button the game start the scene in this way: [[CCDirector sharedDirector] runWithScene:gameScene]; ok, now when I want to quit I just replace the UIViewController (because I did the menu with UIKit and the game with cocos2d) with the starting view controller to do the animation I want, it works fine... but obviously the

No known class method for selector scene? [duplicate]

瘦欲@ 提交于 2019-12-13 06:20:06
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Error “No known class method for selector 'Hello:'” in custom-made framework I am creating a Main menu for my game here It does not compile but i do not understand why // Main Menu.m // // // #import "MainMenu.h" #import "CCTouchDispatcher.h" #import "Instructions.h" CCSprite *seeker1; CCSprite *cocosGuy; @implementation MainMenu + (CCScene *) scene { CCScene * scene = [CCScene node]; // scene is an autorelease

Reloading a game with corona sdk

心已入冬 提交于 2019-12-13 02:11:37
问题 I am creating my first iPhone game and cannot figure out how to reload my game. I am using coronaSDK and have tried to use their composer API. When the player dies a button with "play again" appears and when he touches it I direct him to a scene called "reload.lua" with composer.gotoScene("reload") . In this scene I have the following code: function scene:show(event) local sceneGroup = self.view local phase = event.phase if (phase == "will") then elseif (phase == "did") then local replay =

Flash Actionscript 3.0 “Enter” Key Causes scene to change

核能气质少年 提交于 2019-12-12 23:04:21
问题 I am creating a Flash game. Unfortunately, when the Player presses "Enter," the game continuously cycles through its scenes. I tried the following (although I know it's a bit buckshee): // The Enter Key was pressed // If the Enter key is pressed, the keyboard input is "changed" to // be '.'. This prevents a problem in which the Player would // press 'Enter' and the game screen would continuously cycle // through scenes if (event.keyCode == Keyboard.ENTER) { // The 'PERIOD' key does nothing