本文整理汇总了C#中Stage类的典型用法代码示例。如果您正苦于以下问题:C# Stage类的具体用法?C# Stage怎么用?C# Stage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Stage类属于命名空间,在下文中一共展示了Stage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScenarioData
private Stage _stageState; //!< ステージの状態
#endregion Fields
#region Constructors
public ScenarioData(ScenarioPatternType i_type, Stage i_state, TextAsset i_scenario, bool i_read)
{
_scenarioType = i_type;
_stageState = i_state;
_scenario = i_scenario;
IsRead = i_read;
}
示例2: JoinLobby
private void JoinLobby()
{
ChangeSizeOfLobby(SizeOfLobbyDropdown.value);
prefs.setSize(sizeOfLobby);
driver.JoinLobby(sizeOfLobby);
currentStage = Stage.JoinLobby;
}
示例3: LoadContent
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content, ParameterSet parm, Stage stage)
{
if (contentLoaded)
return;
bool initialized = false;
model = BasicModelLoad(parm, out initialized);
if (!initialized)
{
foreach (ModelMesh mesh in model.Meshes)
{
foreach (ModelMeshPart part in mesh.MeshParts)
{
Water effect = new Water(content.Load<Effect>("Effects/v2/Water"));
if (stage.Parm.HasParm("WaterSpecularPower"))
effect.SpecularPower = stage.Parm.GetFloat("WaterSpecularPower");
if (stage.Parm.HasParm("WaterShininess"))
effect.Shininess = stage.Parm.GetFloat("WaterShininess");
if (stage.Parm.HasParm("WaterColor"))
effect.WaterColor = stage.Parm.GetVector4("WaterColor");
if (stage.Parm.HasParm("WaterBase"))
effect.WaterBase = stage.Parm.GetVector4("WaterBase");
part.Effect = effect;
}
}
}
transforms = new Matrix[model.Bones.Count];
model.CopyAbsoluteBoneTransformsTo(transforms);
base.LoadContent(content, parm, stage);
}
示例4: SetStage
public void SetStage(Stage stage, UnityAction clickAction)
{
_stage = stage;
_stageName.text = _stage._stageName;
GetComponent<Button> ().onClick.AddListener (clickAction);
}
示例5: Start
// Use this for initialization
protected override void Start()
{
base.Start();
this.stageComponent = GameObject.FindGameObjectWithTag("Stage").GetComponent<Stage>();
this.SetTracePoints(this.stageComponent.GetPoints());
this.gameObject.GetComponent<LineTracer>().SetTracePoints(stageComponent.GetPoints());
}
示例6: LoaderForm
public LoaderForm()
{
InitializeComponent();
stage = Stage.UserInfo;
// setting up the starting loader screen
LabelOperationPercentage.Text = "0%";
LabelOverallStage.Text = "0/5";
LabelOperation.Text = "Contacting Facebook...";
// setting up the worker thread
backgroundLoader = new System.ComponentModel.BackgroundWorker();
backgroundLoader.WorkerReportsProgress = true;
backgroundLoader.WorkerSupportsCancellation = true;
backgroundLoader.DoWork += new DoWorkEventHandler(backgroundLoader_DoWork);
backgroundLoader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundLoader_RunWorkerCompleted);
backgroundLoader.ProgressChanged += new ProgressChangedEventHandler(backgroundLoader_ProgressChanged);
// starting the calculation
// runs the GenerateGraph() method in Generator.cs
backgroundLoader.RunWorkerAsync();
}
示例7: Activate
void Activate()
{
if (GameObject.Find("Main Camera").GetComponent<MovieClipOverlayCameraBehaviour>() == null)
{
return;
}
PauseStage = Camera.main.GetComponent<MovieClipOverlayCameraBehaviour>().stage;
BackGround = new MovieClip("swf/PauseField.swf:FadeBackground");
BackGround.gotoAndStop(1);
BackGround.x = Screen.width / 2;
BackGround.y = Screen.height / 2;
BackGround.scaleX = (float)Screen.width / 2048;
BackGround.scaleY = BackGround.scaleX;
PauseStage.addChild(BackGround);
for (int i = 0; i < ButtonCount; i++)
{
Buttons[i] = new MovieClip("swf/PauseField.swf:PauseField");
Buttons[i].gotoAndStop(1);
Buttons[i].x = Screen.width/2;
Buttons[i].y = Screen.height * 0.3f + (float)Screen.height/2048 * 220 * i;
Buttons[i].scaleX = (float)Screen.width / 2048;
Buttons[i].scaleY = Buttons[i].scaleX;
MenuFields[i] = Buttons[i].getChildByName<TextField>("Text");
MenuFields[i].text = names[i];
PauseStage.addChild(Buttons[i]);
}
Buttons[0].addEventListener(MouseEvent.CLICK, Resume);
Buttons[1].addEventListener(MouseEvent.CLICK, Reload);
Buttons[3].addEventListener(MouseEvent.CLICK, Quit);
}
示例8: GetStages
public static List<Stage> GetStages()
{
List<Stage> result = new List<Stage>();
try
{
// Get data
DbDataReader reader = Database.GetData("SELECT * FROM stage");
foreach (DbDataRecord record in reader)
{
// Create new Stage
Stage stage = new Stage();
// Get ID
if (DBNull.Value.Equals(record["ID"])) stage.ID = -1;
else stage.ID = Convert.ToInt32(record["ID"]);
// Get Name
if (DBNull.Value.Equals(record["Name"])) stage.Name = "";
else stage.Name = record["Name"].ToString();
result.Add(stage);
}
reader.Close();
}
// Fail
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return result;
}
示例9: ScenarioDebugData
private Stage _stageState; //!< ステージの状態
#endregion Fields
#region Constructors
public ScenarioDebugData(ScenarioPatternType i_type, Stage i_state, string i_scenario, bool i_read)
{
_scenarioType = i_type;
_stageState = i_state;
_scenario = i_scenario;
IsRead = i_read;
}
示例10: Can_make_many_concurrent_calls
public void Can_make_many_concurrent_calls()
{
var stage = new Stage();
var a1 = stage.Create<IAdder>().Proxy;
var start = new ManualResetEvent(false);
var ready = new List<ManualResetEvent>();
var tasks = new List<Task<int>>();
for(var i = 0; i < 10; i++) {
var i2 = i;
var mre = new ManualResetEvent(false);
ready.Add(mre);
var tcs = new TaskCompletionSource<int>();
tasks.Add(tcs.Task);
new Thread(() => {
mre.Set();
start.WaitOne();
a1.Add(i2, 10).ContinueWith(t => tcs.SetResult(t.Result));
}).Start();
}
WaitHandle.WaitAll(ready.ToArray());
start.Set();
Task.WaitAll(tasks.ToArray());
Debug.WriteLine("all tasks completed");
for(var i = 0; i < 10; i++) {
Assert.AreEqual(10 + i, tasks[i].Result);
}
}
示例11: Initialize
public override void Initialize(Stage stage)
{
SkinnedRModelInstance modelInstance = actor.modelInstance as SkinnedRModelInstance;
animations = new AnimationPlayer[(int)AnimationTypes.COUNT];
if (actor.Parm.HasParm("WeakAttackAnimation"))
animations[(int)AnimationTypes.WeakAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("WeakAttackAnimation")), modelInstance);
if (actor.Parm.HasParm("MediumAttackAnimation"))
animations[(int)AnimationTypes.MediumAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("MediumAttackAnimation")), modelInstance);
if (actor.Parm.HasParm("HeavyAttackAnimation"))
animations[(int)AnimationTypes.HeavyAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("HeavyAttackAnimation")), modelInstance);
if (actor.Parm.HasParm("SmashAttackAnimation"))
animations[(int)AnimationTypes.SmashAttack] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("SmashAttackAnimation")), modelInstance);
if (actor.Parm.HasParm("DashAnimation"))
animations[(int)AnimationTypes.Dash] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("DashAnimation")), modelInstance);
if (actor.Parm.HasParm("IdleAnimation"))
animations[(int)AnimationTypes.Idle] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("IdleAnimation")), modelInstance);
if (actor.Parm.HasParm("DeathAnimation"))
animations[(int)AnimationTypes.Die] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("DeathAnimation")), modelInstance);
if (actor.Parm.HasParm("WalkAnimation"))
animations[(int)AnimationTypes.Walk] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("WalkAnimation")), modelInstance);
if (actor.Parm.HasParm("TakeDamageAnimation"))
animations[(int)AnimationTypes.TakeDamage] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("TakeDamageAnimation")), modelInstance);
if (actor.Parm.HasParm("JumpAnimation"))
animations[(int)AnimationTypes.Jump] = new AnimationPlayer(AnimationClip.LoadClip(actor.Parm.GetString("JumpAnimation")), modelInstance);
}
示例12: PostProcessStage
public static void PostProcessStage(Stage stage, List<MapEntityLoader.RawMapEntity> rawEntityData)
{
// Process objects which belong to both Stage and Rooms.
PostProcessSharedEntities(stage, rawEntityData);
// Create Arrows out of AROB tags
PostProcessArrows(stage, "AROB", rawEntityData);
// Create Paths out of RPAT tags
PostProcessPaths(stage, "PATH", "PPNT", rawEntityData);
// Non Physical Items
PostProcessMult(rawEntityData);
// CAMR
// DMAP
// EnvR
// Colo
// Pale
// Virt
// EVNT
// MECO
// MEMA
// RTBL
// STAG
}
示例13: ChangeRound
void ChangeRound()
{
//If all targets have been hit proceed
switch (myStage)
{
case Stage.Start:
StartCoroutine(RoundTransition(startTarget, wave1));
myStage = Stage.Wave1;
break;
case Stage.Wave1:
StartCoroutine(RoundTransition(wave1, wave2));
myStage = Stage.Wave2;
break;
case Stage.Wave2:
StartCoroutine(RoundTransition(wave2, wave3));
myStage = Stage.Wave3;
break;
case Stage.Wave3:
print("Rounds finished!");
myStage = Stage.Done;
doDone();
break;
default:
break;
}
sequenceIndex = 0;
}
示例14: Initialize
public override void Initialize(Stage stage)
{
base.Initialize(stage);
if (actor.Parm.HasParm("AddToAIQB") && actor.Parm.GetBool("AddToAIQB"))
stage.GetQB<AIQB>().AddLiveEnemy(actor);
if (actor.PhysicsObject.physicsType == PhysicsObject.PhysicsType.Box)
{
//if we are a platform
if (actor.Parm.HasParm("Platform") && actor.Parm.GetBool("Platform"))
{
actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.platformGroup;
bloodOnDamage = false;
}
else
actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.normalAIGroup;
actor.PhysicsObject.CollisionInformation.Entity.IsAffectedByGravity = false;
stunnable = false;
}
else if(actor.PhysicsObject.physicsType == PhysicsObject.PhysicsType.CylinderCharacter)
{
actor.PhysicsObject.CollisionInformation.CollisionRules.Group = PhysicsQB.normalAIGroup;
actor.PhysicsObject.CylinderCharController.HorizontalMotionConstraint.Speed = 0;
}
}
示例15: Awake
/// <summary>
/// Awake
/// </summary>
public override void Awake()
{
base.Awake();
// ステージ状態をセット
nowStage += 1;
if (Application.loadedLevelName == Data.d_StageNameList[1]) nowStage = Stage.title;
if (debug || nowStage == Stage.opening) nowStage = Stage.stage1;
// シナリオデータを読み込む(正直、都度読み込む方が都合が良いけれども今回読み込む量はそんなに多くないはずなのでスタックしてしまう)
if (scenarioData.Count <= 0) {
StartCoroutine(ReadScenarioData());
}
if (stageUIDic.Count <= 0) {
SetStageUISprites();
}
// 弾丸データを読み込む
BulletBase.CreateEnemyBulletGroupData();
BulletBase.CreateEnemyBulletRadData();
DirectionData.CreateBezierDirectionData();
PlayerBulletMaster.CreatePlayerMasterData();
// 通常敵AIデータを読み込む
EnemyFactory.CreateNormalEnemyAiData();
// 背景読み込み
StageBackground.CreateBackgroundImageData();
StageBackground.CreateBackgroundImageSettingData();
}