本文整理汇总了C#中FStage类的典型用法代码示例。如果您正苦于以下问题:C# FStage类的具体用法?C# FStage怎么用?C# FStage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FStage类属于命名空间,在下文中一共展示了FStage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FRenderLayer
public FRenderLayer(FStage stage, FAtlas atlas, FShader shader)
{
_stage = stage;
_atlas = atlas;
_shader = shader;
_expansionAmount = Futile.quadsPerLayerExpansion;
_maxEmptyQuads = Futile.maxEmptyQuadsPerLayer;
batchIndex = atlas.index*10000 + shader.index;
_gameObject = new GameObject("FRenderLayer ("+_stage.name+")");
_transform = _gameObject.transform;
_transform.parent = Futile.instance.gameObject.transform;
_meshFilter = _gameObject.AddComponent<MeshFilter>();
_meshRenderer = _gameObject.AddComponent<MeshRenderer>();
_meshRenderer.castShadows = false;
_meshRenderer.receiveShadows = false;
_mesh = _meshFilter.mesh;
_material = new Material(_shader.shader);
_material.mainTexture = _atlas.texture;
_meshRenderer.renderer.material = _material;
_gameObject.active = false;
ExpandMaxQuadLimit(Futile.startingQuadsPerLayer);
UpdateTransform();
}
示例2: SwitchToScene
public static void SwitchToScene(SceneType sceneType)
{
FStage oldScene = null;
oldScene = currentScene;
if (sceneType == SceneType.MergeNamesScene) currentScene = new TMergeNamesScene();
else if (sceneType == SceneType.ClickHeartsScene) currentScene = new TClickHeartsScene();
else if (sceneType == SceneType.PeopleSceneGoalOne) {
currentScene = new TPeopleScene(GoalType.GoalOne);
goalOneTutorialIsDone = true;
}
else if (sceneType == SceneType.PeopleSceneGoalTwo) currentScene = new TPeopleScene(GoalType.GoalTwo);
else if (sceneType == SceneType.PeopleSceneGoalThree) currentScene = new TPeopleScene(GoalType.GoalThree);
else if (sceneType == SceneType.DreamSceneOne) currentScene = new TDreamScene(DreamSceneType.DreamSceneOne);
else if (sceneType == SceneType.DreamSceneTwo) currentScene = new TDreamScene(DreamSceneType.DreamSceneTwo);
if (oldScene != null) {
currentScene.alpha = 0;
Go.to(oldScene, 0.3f, new TweenConfig().floatProp("alpha", 0.0f).onComplete(OnOldSceneCompletedFadingOut));
Go.to(currentScene, 0.3f, new TweenConfig().floatProp("alpha", 1.0f));
}
Futile.AddStage(currentScene);
Futile.AddStage(labelDisplayLayer); // move to top
}
示例3: Start
// Use this for initialization
void Start()
{
FutileParams futileParams = new FutileParams(true, true, true, true);
manager = new MouseManager(this);
futileParams.AddResolutionLevel(800, 1, 1, "");
futileParams.origin = new Vector2(
0.0f, 0.0f);
Futile.instance.Init(futileParams);
Futile.atlasManager.LoadImage("grasstile");
Futile.atlasManager.LoadImage("foresttile");
Futile.atlasManager.LoadImage("soldier");
Futile.atlasManager.LoadImage("bluehighlight");
var tileSize = 30;
var width = 50;
var height = 35;
var tiles = new TileProperties[width, height];
var grassTile = new TileProperties()
{
SpriteName = "grasstile",
MovementPenalty = 1
};
var forestTile = new TileProperties()
{
SpriteName = "foresttile",
MovementPenalty = 2
};
var actorProps = new ActorProperties()
{
SpriteName = "soldier",
Name = "Hunkfort",
MovementPoints = 5
};
var rand = new System.Random();
for (int ii = 0; ii < width; ii++)
{
for (int jj = 0; jj < height; jj++)
{
tiles[ii, jj] = (rand.NextDouble() < 0.7) ? grassTile : forestTile;
}
}
this.map = new Map(tiles, tileSize);
this.map.AddActor(actorProps, new Vector2i(5, 5));
this.map.Start();
tileStage = new FStage("test");
Futile.AddStage(tileStage);
tileStage.stage.AddChild(this.map);
}
示例4: World
public World()
{
instance = this;
isGameOver = false;
root = FPWorld.Create(64.0f);
AddChild(backParticles = new FParticleSystem(150));
AddChild(chainHolder = new FContainer());
AddChild(beastShadowHolder = new FContainer());
AddChild(beastHolder = new FContainer());
AddChild(effectHolder = new FContainer());
AddChild(glowParticles = new FParticleSystem(150));
glowParticles.shader = FShader.Additive;
AddChild(orbHolder = new FContainer());
uiStage = new FStage("UIStage");
Futile.AddStage(uiStage);
uiStage.scale = Futile.stage.scale;
uiStage.AddChild(uiHolder = new FContainer());
teams = GameManager.instance.activeTeams;
InitBeasts();
InitOrbs();
InitUI();
spawnRateMultiplier = 1.0f;
walls = new Walls(this);
ListenForUpdate(HandleUpdate);
Input.ResetInputAxes();
}
示例5: FFacetRenderLayer
public FFacetRenderLayer(FStage stage, FFacetType facetType, FAtlas atlas, FShader shader)
{
this.stage = stage;
this.facetType = facetType;
this.atlas = atlas;
this.shader = shader;
_expansionAmount = facetType.expansionAmount;
_maxEmptyFacets = facetType.maxEmptyAmount;
this.batchIndex = facetType.index*10000000 + atlas.index*10000;
_gameObject = new GameObject("FRenderLayer ("+stage.name+") ("+facetType.name+")");
_transform = _gameObject.transform;
_transform.parent = Futile.instance.gameObject.transform;
_meshFilter = _gameObject.AddComponent<MeshFilter>();
_meshRenderer = _gameObject.AddComponent<MeshRenderer>();
_meshRenderer.castShadows = false;
_meshRenderer.receiveShadows = false;
_mesh = _meshFilter.mesh;
//we could possibly create a pool of materials so they can be reused,
//but that would create issues when unloading textures, so it's probably not worth it
_material = new Material(shader.shader);
_material.mainTexture = atlas.texture;
_meshRenderer.GetComponent<Renderer>().sharedMaterial = _material;
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5
_gameObject.active = false;
#else
_gameObject.SetActive(false);
_mesh.MarkDynamic();
#endif
ExpandMaxFacetLimit(facetType.initialAmount);
UpdateTransform();
}
示例6: FFacetRenderLayer
public FFacetRenderLayer(FStage stage, FFacetType facetType, FAtlas atlas, FShader shader)
{
this.stage = stage;
this.facetType = facetType;
this.atlas = atlas;
this.shader = shader;
_expansionAmount = facetType.expansionAmount;
_maxEmptyFacets = facetType.maxEmptyAmount;
this.batchIndex = facetType.index*10000000 + atlas.index*10000;
_gameObject = new GameObject("FRenderLayer ("+stage.name+") ("+facetType.name+")");
_transform = _gameObject.transform;
_transform.parent = Futile.instance.gameObject.transform;
_meshFilter = _gameObject.AddComponent<MeshFilter>();
_meshRenderer = _gameObject.AddComponent<MeshRenderer>();
_meshRenderer.castShadows = false;
_meshRenderer.receiveShadows = false;
_mesh = _meshFilter.mesh;
_material = new Material(shader.shader);
_material.mainTexture = atlas.texture;
_meshRenderer.renderer.sharedMaterial = _material;
//_meshRenderer.renderer.material = _material;
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5
_gameObject.active = false;
#else
_gameObject.SetActive(false);
_mesh.MarkDynamic();
#endif
ExpandMaxFacetLimit(facetType.initialAmount);
UpdateTransform();
}
示例7: FFacetRenderLayer
public FFacetRenderLayer(FStage stage, FFacetType facetType, FAtlas atlas, FShader shader)
{
_stage = stage;
_facetType = facetType;
_atlas = atlas;
_shader = shader;
_expansionAmount = _facetType.expansionAmount;
_maxEmptyFacets = _facetType.maxEmptyAmount;
batchIndex = _facetType.index*10000000 + atlas.index*10000 + shader.index;
_gameObject = new GameObject("FRenderLayer ("+_stage.name+") ("+_facetType.name+")");
_transform = _gameObject.transform;
_transform.parent = Futile.instance.gameObject.transform;
_meshFilter = _gameObject.AddComponent<MeshFilter>();
_meshRenderer = _gameObject.AddComponent<MeshRenderer>();
//_meshRenderer.castShadows = false;
_meshRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
_meshRenderer.receiveShadows = false;
_mesh = _meshFilter.mesh;
_material = new Material(_shader.shader);
_material.mainTexture = _atlas.texture;
_meshRenderer.GetComponent<Renderer>().material = _material;
#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5
_gameObject.active = false;
#else
_gameObject.SetActive(false);
_mesh.MarkDynamic();
#endif
ExpandMaxFacetLimit(_facetType.initialAmount);
UpdateTransform();
}
示例8: FRenderLayer
public FRenderLayer(FStage stage, FFacetType facetType, FAtlas atlas, FShader shader)
{
_stage = stage;
_facetType = facetType;
_atlas = atlas;
_shader = shader;
_expansionAmount = _facetType.expansionAmount;
_maxEmptyFacets = _facetType.maxEmptyAmount;
batchIndex = _facetType.index*10000000 + atlas.index*10000 + shader.index;
_gameObject = new GameObject("FRenderLayer ("+_stage.name+") ("+_facetType.name+")");
_transform = _gameObject.transform;
_transform.parent = Futile.instance.gameObject.transform;
_meshFilter = _gameObject.AddComponent<MeshFilter>();
_meshRenderer = _gameObject.AddComponent<MeshRenderer>();
_meshRenderer.castShadows = false;
_meshRenderer.receiveShadows = false;
_mesh = _meshFilter.mesh;
_material = new Material(_shader.shader);
_material.mainTexture = _atlas.texture;
_meshRenderer.renderer.material = _material;
_gameObject.active = false;
ExpandMaxFacetLimit(_facetType.initialAmount);
UpdateTransform();
}
示例9: Start
// Use this for initialization
void Start()
{
Application.targetFrameRate = 300;
QualitySettings.vSyncCount = 0;
RXDebug.Log ("Starting the game");
instance = this;
FSoundManager.Init ();
Go.defaultEaseType = EaseType.Linear;
Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
FutileParams fparams = new FutileParams (true, true, false, true);
fparams.AddResolutionLevel (480.0f, 1.0f, 1.0f, ""); //iPhone
fparams.origin = new Vector2 (0.0f, 0.0f);
Futile.instance.Init (fparams);
Futile.atlasManager.LoadAtlas ("Atlases/Factory");
Futile.atlasManager.LoadAtlas("Atlases/SFB");
Futile.atlasManager.LoadFont("font", "font", "Atlases/font", 0, 0);
_stage = Futile.stage;
GoToPage (PageType.GamePage);
}
示例10: GoToMenu
public void GoToMenu(PageType pageType)
{
if(currentPageType == pageType) return; // already on this menu
// Get the stage
stage_ = Futile.stage;
// Remove the current page if it exists
if(currentPage != null && stage_ != null){
stage_.RemoveChild(currentPage);
}
// Set new page and page type
switch(pageType){
case PageType.TitlePage:
currentPageType = PageType.TitlePage;
currentPage = new TitlePage();
break;
case PageType.LevelSelectPage:
currentPageType = PageType.LevelSelectPage;
currentPage = new LevelSelectPage();
break;
case PageType.CreditsPage:
currentPageType = PageType.CreditsPage;
currentPage = new CreditsPage();
break;
}
// Add the page and init it
stage_.AddChild(currentPage);
currentPage.Start();
}
示例11: Start
void Start()
{
RXDebug.Log("Starting the demo");
instance = this;
Go.defaultEaseType = EaseType.Linear;
Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
FutileParams fparams = new FutileParams(true,true, false,false);
fparams.AddResolutionLevel(480.0f, 1.0f, 1.0f, ""); //iPhone
// fparams.AddResolutionLevel(960.0f, 2.0f, 2.0f, "_Scale2"); //iPhone retina
fparams.AddResolutionLevel(1024.0f, 1.0f, 1.0f, ""); //iPad
// fparams.AddResolutionLevel(1280.0f, 2.0f, 2.0f, "_Scale2"); //Nexus 7
// fparams.AddResolutionLevel(2048.0f, 4.0f, 4.0f, "_Scale4"); //iPad Retina
fparams.origin = new Vector2(0.5f,0.5f);
Futile.instance.Init (fparams);
Futile.atlasManager.LoadAtlas("Atlases/SFB");
Futile.atlasManager.LoadAtlas("Atlases/SFB_en");
Futile.atlasManager.LoadFont("font", "font", "Atlases/font", 0, 0);
_stage = Futile.stage;
GoToPage(PageType.MenuPage);
_stage.ListenForUpdate (HandleUpdate);
}
示例12: Start
void Start()
{
instance = this;
Go.defaultEaseType = EaseType.Linear;
Go.duplicatePropertyRule = DuplicatePropertyRuleType.RemoveRunningProperty;
FutileParams fparams = new FutileParams(true, true, false, false);
fparams.AddResolutionLevel(960.0f, 1.0f, 1.0f, ""); //iPhone
fparams.origin = new Vector2(0.5f,0.5f);
fparams.backgroundColor = new Color(18f / 100f, 13f / 100f, 28f / 100f, 1f);
Futile.instance.Init (fparams);
Futile.atlasManager.LoadImage("Atlases/Font");
Futile.atlasManager.LoadImage("Atlases/title");
Futile.atlasManager.LoadImage("Atlases/bg");
Futile.atlasManager.LoadAtlas("Atlases/SpriteSheet");
Futile.atlasManager.LoadFont("Minecraftia", "Atlases/Font", "Atlases/Font", 0, 0);
_stage = Futile.stage;
GoToPage(PageType.MainMenuPage);
_stage.ListenForUpdate (HandleUpdate);
}
示例13: SwitchToScene
public void SwitchToScene(SceneType sceneType)
{
if (currentScene != null) Futile.RemoveStage(currentScene);
if (sceneType == SceneType.Immunity) currentScene = new WTImmunity();
if (sceneType == SceneType.None) currentScene = null;
if (currentScene != null) Futile.AddStage(currentScene);
}
示例14: FSceneManager
private FSceneManager()
: base()
{
mScenes = new List<FScene>();
mRemoveScenes = new List<FScene>();
mStage = Futile.stage;
mStage.AddChild( this );
ListenForUpdate( HandleUpdate );
}
示例15: SwitchToScene
public void SwitchToScene(SceneType sceneType)
{
if (currentScene != null) Futile.RemoveStage(currentScene);
if (sceneType == SceneType.Compartments) currentScene = new WTCompartments();
if (sceneType == SceneType.BlahGame) currentScene = new WTBlahGame();
if (sceneType == SceneType.FrendenGame) currentScene = new WTFrendenGame();
if (sceneType == SceneType.Hexagon) currentScene = new WTHexagon();
if (sceneType == SceneType.None) currentScene = null;
if (currentScene != null) Futile.AddStage(currentScene);
}