コード例 #1
0
ファイル: CutTeethEvent.cs プロジェクト: Tigerkim06/VRdentist
    public override void InitEvent()
    {
        base.InitEvent();
        bool foundTeeth   = SceneAssetManager.GetGameObjectAsset(wisdomTeethName, out wisdomTeeth);
        bool foundTrigger = SceneAssetManager.GetAssetComponent <CollisionTrigger>(wisdomTeethTriggerName, out wisdomTeethTrigger);
        bool foundItem    = SceneAssetManager.GetAssetComponent <GrabbableEquipmentBehavior>(toolName, out tool);
        bool foundText    = SceneAssetManager.GetAssetComponent <Text>(progressTextName, out progressText);

        fragmentTooth = new List <GameObject>();
        foreach (string targetName in fragmentTeethNames)
        {
            if (SceneAssetManager.GetGameObjectAsset(targetName, out GameObject targetObject))
            {
                targetObject.SetActive(false); // hide at begin
                fragmentTooth.Add(targetObject);
            }
        }

        Debug.Log("Found Asset[" + wisdomTeethName + "]: " + foundTeeth);
        Debug.Log("Found Asset[" + wisdomTeethTriggerName + "]: " + foundTrigger);
        Debug.Log("Found Asset[fragment Teeth]: " + (fragmentTooth.Count > 0));
        Debug.Log("Found Asset[" + toolName + "]: " + foundItem);
        Debug.Log("Found Asset[" + progressTextName + "]: " + foundText);

        if (wisdomTeeth)
        {
            wisdomTeeth.SetActive(true);
        }

        if (nextScene)
        {
            nextScene.InitEvent();
        }
    }
コード例 #2
0
    public override void InitEvent()
    {
        base.InitEvent();
        bool foundTargetObject = SceneAssetManager.GetAssetComponent <Collider>(targetObjectName, out targetObjectCollider);
        bool foundFirstObject  = SceneAssetManager.GetAssetComponent <Collider>(firstObjectName, out firstObjectCollider);
        bool foundSecondObject = SceneAssetManager.GetAssetComponent <Collider>(secondObjectName, out secondObjectCollider);

        Debug.Log("Found Asset[" + targetObjectName + "]: " + foundTargetObject);
        Debug.Log("Found Asset[" + firstObjectName + "]: " + foundFirstObject);
        Debug.Log("Found Asset[" + secondObjectName + "]: " + foundSecondObject);
        if (targetObjectCollider != null && firstObjectCollider != null && secondObjectCollider != null)
        {
            targetObjectCollider.enabled = false;
            firstObjectCollider.enabled  = false;
            secondObjectCollider.enabled = false;
        }

        hitTarget = 0;

        if (collideFirstNextScene)
        {
            collideFirstNextScene.InitEvent();
        }
        if (collideSecondNextScene)
        {
            collideSecondNextScene.InitEvent();
        }
    }
コード例 #3
0
    public override void InitEvent()
    {
        base.InitEvent();
        bool found = SceneAssetManager.GetAsset(assetName, out target);

        Debug.Log("Found Asset[" + assetName + "]: " + found);
        if (nextScene)
        {
            nextScene.InitEvent();
        }
    }
コード例 #4
0
    public override void InitEvent()
    {
        base.InitEvent();
        bool foundTrigger = SceneAssetManager.GetAssetComponent <CollisionTrigger>(collisionTriggerName, out trigger);
        bool foundItem    = SceneAssetManager.GetAssetComponent <GrabbableEquipmentBehavior>(targetItemName, out targetItem);

        Debug.Log("Found Asset[" + collisionTriggerName + "]: " + foundTrigger);
        Debug.Log("Found Asset[" + targetItemName + "]: " + foundItem);

        if (nextScene)
        {
            nextScene.InitEvent();
        }
    }
コード例 #5
0
    public override void InitEvent()
    {
        base.InitEvent();
        bool foundFirstObject  = SceneAssetManager.GetAssetComponent <Collider>(firstObjectName, out firstObjectCollider);
        bool foundSecondObject = SceneAssetManager.GetAssetComponent <Collider>(secondObjectName, out secondObjectCollider);

        Debug.Log("Found Asset[" + firstObjectName + "]: " + foundFirstObject);
        Debug.Log("Found Asset[" + secondObjectName + "]: " + foundSecondObject);
        if (firstObjectCollider != null && secondObjectCollider != null)
        {
            firstObjectCollider.enabled  = false;
            secondObjectCollider.enabled = false;
        }
        if (nextScene)
        {
            nextScene.InitEvent();
        }
    }
コード例 #6
0
 void Awake()
 {
     Instance = this;
 }
コード例 #7
0
 public void Awake()
 {
     instance        = this;
     assetDictionary = new Dictionary <string, SceneAsset>();
 }