当前位置: 首页>>代码示例>>C#>>正文


C# Transform.StepSpawnScript方法代码示例

本文整理汇总了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);
    }
开发者ID:VCRhythm,项目名称:hotfrog,代码行数:22,代码来源:Player.cs

示例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;
    }
开发者ID:VCRhythm,项目名称:hotfrog,代码行数:19,代码来源:StepSpawner.cs

示例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;
    }
开发者ID:VCRhythm,项目名称:hotfrog,代码行数:20,代码来源:Limb.cs

示例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);
    }
开发者ID:VCRhythm,项目名称:hotfrog,代码行数:13,代码来源:Controller.cs


注:本文中的Transform.StepSpawnScript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。