Пример #1
0
    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
 void Start()
 {
     delayProc    = 0;
     skip         = false;
     toStartEvent = true;
     currentEvent = startEvent;
     if (currentEvent != null)
     {
         currentEvent.InitEvent();
     }
 }
Пример #4
0
    public override void InitEvent()
    {
        base.InitEvent();
        bool found = SceneAssetManager.GetAsset(assetName, out target);

        Debug.Log("Found Asset[" + assetName + "]: " + found);
        if (nextScene)
        {
            nextScene.InitEvent();
        }
    }
Пример #5
0
 public virtual void InitScene(SceneEvent sceneEvent)
 {
     if (sceneEvent == null)
     {
         return;
     }
     if (this.GetInstanceID() == sceneEvent.GetInstanceID())
     {
         return;
     }
     sceneEvent.InitEvent();
 }
Пример #6
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();
        }
    }
    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();
        }
    }