本文整理汇总了C#中Transform.StepSpawnScript方法的典型用法代码示例。如果您正苦于以下问题:C# Transform.StepSpawnScript方法的具体用法?C# Transform.StepSpawnScript怎么用?C# Transform.StepSpawnScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transform
的用法示例。
在下文中一共展示了Transform.StepSpawnScript方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TouchStep
protected override void TouchStep(Transform step, int touchIndex, Vector2 worldPos)
{
if (IsPlaying && !step.StepSpawnScript().wasGrabbedControllerID[ControllerID])
{
step.StepSpawnScript().wasGrabbedControllerID[ControllerID] = true;
float distance = (worldPos - (Vector2)step.position).sqrMagnitude;
int index = distance > 20 ? 0 : (distance > 10 ? 1 : 2);
TrackGrabQuality(index, worldPos);
hud.StepsClimbed++;
}
Limb limb = GetFreeLimb();
limb.SetStep(step, touchIndex);
if (!canFall && step.StepSpawnScript().canPull)
{
canFall = true;
menuManager.IsShowingReturnPanel = false;
}
LevelManager.Instance.CheckForStepTrigger(step, hud.StepsClimbed);
}
示例2: CreateSpawn
protected override Transform CreateSpawn(int spawnIndex = -1)
{
newSpawn = base.CreateSpawn(spawnIndex);
if (newSpawn == null) return null;
newStep = newSpawn.StepSpawnScript();
if (!newStep.canBeSpawned(spawnCount))
{
newStep.Destroy();
spawnCount--;
CreateSpawn();
return null;
}
LevelManager.Instance.TrackStep(newSpawn);
return newSpawn;
}
示例3: SetStep
public void SetStep(Transform newStep, int newTouchIndex = -1)
{
CancelMovement();
if(newStep == null)
{
if(heldStep != null) OpenHand();
stepScript = null;
heldStep = null;
}
else
{
stepScript = newStep.StepSpawnScript();
stepGameObject = newStep.gameObject;
heldStep = newStep;
Move(newStep);
}
touchIndex = newTouchIndex;
}
示例4: TouchStep
protected virtual void TouchStep(Transform step, int touchIndex, Vector2 worldPos)
{
if (CanPlay && !step.StepSpawnScript().wasGrabbedControllerID[ControllerID])
{
step.StepSpawnScript().wasGrabbedControllerID[ControllerID] = true;
float distance = (worldPos - (Vector2)step.position).sqrMagnitude;
int index = distance > 20 ? 0 : (distance > 10 ? 1 : 2);
TrackGrabQuality(index, worldPos);
}
Limb limb = GetFreeLimb();
limb.SetStep(step, touchIndex);
}