private void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 // Use this for initialization
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
        static int _m_BeginLoadScene(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                CutSceneManager gen_to_be_invoked = (CutSceneManager)translator.FastGetCSObj(L, 1);



                {
                    string                _sceneName          = LuaAPI.lua_tostring(L, 2);
                    System.Action         _successCall        = translator.GetDelegate <System.Action>(L, 3);
                    System.Action <float> _progressChangeCall = translator.GetDelegate <System.Action <float> >(L, 4);

                    gen_to_be_invoked.BeginLoadScene(_sceneName, _successCall, _progressChangeCall);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        PS = PlayerState.Idle;
        //Ani = GetComponent<Animator>();
        Speed     = MinSpeed;
        render    = GetComponent <SpriteRenderer>();
        rigidbody = GetComponent <Rigidbody2D>();

        wallHopeDirection.Normalize();
        wallJumpDirection.Normalize();

        SpawnPoint = transform.position;
        camera     = FindObjectOfType <CameraMove>();

        CutManager = FindObjectOfType <CutSceneManager>();

        reset = FindObjectOfType <ResetManager>();
        for (int i = 0; i < PrismCount; i++)
        {
            GameObject PrismDummy = Instantiate(prism, new Vector2(0, 0), Quaternion.identity);
            Prisms.Add(PrismDummy);
            Prisms[i].SetActive(false);
            reset.prism.Add(PrismDummy.GetComponent <Prism>());
        }
    }
        private void Start()
        {
            startScale = transform.localScale;

            if (spriteRenderer == null)
            {
                spriteRenderer = GetComponentInChildren <SpriteRenderer>();
            }

            if (Item != null && spriteRenderer != null)
            {
                if (Player.PlayerInventoryManager._items != null && Player.PlayerInventoryManager._items.Length > 0)
                {
                    foreach (var item in Player.PlayerInventoryManager._items)
                    {
                        if (item == Item && Item.canBePickedUp)
                        {
                            Destroy(gameObject);

                            return;
                        }
                    }
                }

                spriteRenderer.sprite = Item.sprite;
                gameObject.name       = Item.name;
            }

            clickedObjectDisplay = GameManager.instance.clickedObjectDisplay;
            helpText             = GameManager.instance.helpText;
            cutSceneManager      = GameManager.instance.cutSceneManager;
        }
 // DH.ShowDialogue (To show dialogue )
 public void Init()
 {
     instance = this;
     DH.init();
     //InputHandler(SceneGF,"Walk");
     StartCoroutine(DialogueScript());
 }
    void Awake()
    {
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();

        switches = GetComponentsInChildren<MechSwitch>();
        blocks = GetComponentsInChildren<MechBlock>();
        spawner = GetComponentInChildren<MonsterSpawning>();

        unlocked = 0;
        puzzleActivated = false;

        blockPositions = new List<List<Vector2>> {
            new List<Vector2> {
                new Vector2(-3f, 17f),
                new Vector2(3f, 17f),
                new Vector2(3f, 11f)
            },
            new List<Vector2> {
                new Vector2(4f, 39f),
                new Vector2(-4f, 39f),
                new Vector2(4f, 31f)
            },
            new List<Vector2> {
                new Vector2(-4f, 53f),
                new Vector2(4f, 53f),
                new Vector2(4f, 63f)
            }
        };
    }
Exemplo n.º 8
0
 private void Start()
 {
     theIC              = FindObjectOfType <InteractionController>();
     theCam             = FindObjectOfType <CameraController>();
     theSpriteManager   = FindObjectOfType <SpriteManager>();
     theSplashManager   = FindObjectOfType <SplashManager>();
     theCutSceneManager = FindObjectOfType <CutSceneManager>();
 }
    void Awake()
    {
        obstaclePrefab = Resources.Load("comp_block");
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();

        currentSetNumber = 0;

        sets = new List<List<Vector2>>();

        List<Vector2> set1 = new List<Vector2>();
        set1.Add(new Vector2(2, 0));
        set1.Add(new Vector2(7, 0));
        set1.Add(new Vector2(6, 1));
        set1.Add(new Vector2(1, 3));
        set1.Add(new Vector2(5, 3));
        set1.Add(new Vector2(2, 5));
        set1.Add(new Vector2(0, 6));
        set1.Add(new Vector2(6, 6));
        set1.Add(new Vector2(3, 7));
        sets.Add(set1);

        List<Vector2> set2 = new List<Vector2>();
        set2.Add(new Vector2(1, 0));
        set2.Add(new Vector2(7, 1));
        set2.Add(new Vector2(9, 2));
        set2.Add(new Vector2(2, 3));
        set2.Add(new Vector2(4, 4));
        set2.Add(new Vector2(6, 4));
        set2.Add(new Vector2(1, 5));
        set2.Add(new Vector2(7, 6));
        set2.Add(new Vector2(0, 7));
        sets.Add(set2);

        List<Vector2> set3 = new List<Vector2>();
        set3.Add(new Vector2(4, 0));
        set3.Add(new Vector2(0, 1));
        set3.Add(new Vector2(9, 4));
        set3.Add(new Vector2(3, 5));
        set3.Add(new Vector2(6, 6));
        set3.Add(new Vector2(1, 7));
        sets.Add(set3);

        List<Vector2> set4 = new List<Vector2>();
        set4.Add(new Vector2(4, 0));
        set4.Add(new Vector2(9, 0));
        set4.Add(new Vector2(8, 2));
        set4.Add(new Vector2(9, 3));
        set4.Add(new Vector2(0, 4));
        set4.Add(new Vector2(2, 5));
        set4.Add(new Vector2(4, 6));
        set4.Add(new Vector2(3, 7));
        set4.Add(new Vector2(8, 7));
        sets.Add(set4);

        StartCoroutine(InitializeObstacles());
    }
Exemplo n.º 10
0
 public void BeginCutScene(CutSceneManager.FadeInOutAction method) {
     if (alwaysShow || !shown) {
         shown = true;
         if (timed) {
             CutSceneManager.StartCutScene(cutSceneCamera, method, cutSceneTime);
         } else {
             CutSceneManager.StartCutScene(cutSceneCamera, method);
         }
     }
 }
Exemplo n.º 11
0
    void Awake()
    {
        SingeltonCheck();
        DontDestroyOnLoad(gameObject);         // This keeps the GM alive in all scenes;

        PlayerInputManager   = GetComponent <PlayerInputManager>();
        OrbSystemMenuManager = GetComponent <OrbSystemMenuManager>();
        CutSceneManager      = GetComponent <CutSceneManager>();
        Manager_LoadLevel    = GetComponent <GameManager_LoadLevel>();
    }
Exemplo n.º 12
0
    void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(gameObject);
        }
        _instance = this;

        _sceneIndex = 0;
    }
Exemplo n.º 13
0
 private void Start()
 {
     theIC       = FindObjectOfType <InteractionControler>();
     theCam      = FindObjectOfType <CameraController>();
     theSprite   = FindObjectOfType <SpriteManager>();
     theSplash   = FindObjectOfType <SplashManager>();
     theCutScene = FindObjectOfType <CutSceneManager>();
     theSlide    = FindObjectOfType <SlideManager>();
     theDM       = FindObjectOfType <DisappearingManager>();
 }
        static int _g_get_CurrentSceneName(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                CutSceneManager gen_to_be_invoked = (CutSceneManager)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.CurrentSceneName);
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(1);
        }
Exemplo n.º 15
0
 void Start()
 {
     player         = FindObjectOfType <Player>();
     camera         = FindObjectOfType <CameraMove>();
     Scene          = FindObjectOfType <CutSceneManager>();
     meteor         = GetComponent <MeteorManager>();
     thorn          = GetComponent <ThornManager>();
     finalMoon      = GetComponent <FinalMoon>();
     bossAniManager = GetComponent <BossAniManager>();
     Audio          = FindObjectOfType <AudioManager>();
     Invoke("Complete", 2.0f);
 }
    void Awake()
    {
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();

        blackDoors = blackDoorsParent.GetComponentsInChildren<ElecDoor>();
        blueDoors = blueDoorsParent.GetComponentsInChildren<ElecDoor>();
        redDoors = redDoorsParent.GetComponentsInChildren<ElecDoor>();

        blackDoorsOpen = false;
        redDoorsOpen = false;
        blueDoorsOpen = false;
    }
Exemplo n.º 17
0
    void Awake() {
        cameraManager = GameObject.FindGameObjectWithTag("CameraManager").GetComponent<CameraManager>();
        instance = this;
        fadeImage = transform.Find("FadeImage").GetComponent<Image>();
        fadeTime = FadeTime;
        barMovementTime = BarMovementTime;
        blackBarTop = transform.Find("BlackBarTop").GetComponent<RectTransform>();
        topBarStartPos = blackBarTop.anchoredPosition;
        topBarEndPos = topBarStartPos + Vector2.down * (blackBarTop.rect.height - 40);
        blackBarBot = transform.Find("BlackBarBot").GetComponent<RectTransform>();
        botBarStartPos = blackBarBot.anchoredPosition;
        botBarEndPos = botBarStartPos + Vector2.up * (blackBarBot.rect.height - 40);

    }
    void Awake()
    {
        gman = GameObject.FindGameObjectWithTag(Tags.gameController)
            .GetComponent<GUIManager>();
        csm = GameObject.FindGameObjectWithTag(Tags.mainCamera)
            .GetComponent<CutSceneManager>();
        layer = GameObject.FindGameObjectWithTag(Tags.gameController)
            .GetComponent<Layers>();
        gamecon = GameObject.FindGameObjectWithTag(Tags.gameController)
            .GetComponent<GameController>();
        flag = Flag.GetInstance();

        buttonRect = new Rect(640, 216, 640, 648);
    }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    CutSceneManager gen_ret = new CutSceneManager();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to CutSceneManager constructor!"));
        }
Exemplo n.º 20
0
        private void Start()
        {
            startScale = transform.localScale;

            var displays = FindObjectsOfType <InventoryDisplay>();

            for (int i = 0; i < displays.Length; i++)
            {
                if (displays[i].inventoryToDisplay == null)
                {
                    inventoryDisplay = displays[i];
                    break;
                }
            }

            helpText        = FindObjectOfType <HelpText>();
            cutSceneManager = FindObjectOfType <CutSceneManager>();
        }
Exemplo n.º 21
0
    // 인벤토리 호출 함수. 코루틴은 자체적으로 버튼이벤트에서 실행 불가능하므로 래핑.
    public void OpenInventory()
    {
        // 중복 실행 방지 코드
        if (state != State.DISABLE) // DISABLE 일때만 실행
        {
            return;
        }

        // 서브캠 CG 다 꺼버리기
        CutSceneManager csm = FindObjectOfType <CutSceneManager>();

        if (csm)
        {
            csm.DisableSubCG();
        }


        StartCoroutine(OpenInventoryMove());
    }
Exemplo n.º 22
0
        /* Mod unloading function */
        public override void Unload()
        {
            if (!Main.dedServ)
            {
                StandInterface = null;
                StandoUI       = null;

                //BonusManager.UnLoad();
                CutSceneManager.UnLoad();
            }

            mod                  = null;
            StandSummonHT        = null;
            SpecialAbilityHT     = null;
            StandClientConfig    = null;
            SwitchStandControlHT = null;

            SpecialAbilityManager.UnLoad();
        }
        static int _m_Start(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                CutSceneManager gen_to_be_invoked = (CutSceneManager)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Start(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 24
0
    private void Awake()
    {
        instance = this;

        playerInventoryManager = FindObjectOfType <Player.PlayerInventoryManager>();

        clickedObjectDisplay = FindObjectOfType <ClickedObjectDisplayManager>();
        helpText             = FindObjectOfType <HelpText>();
        cutSceneManager      = FindObjectOfType <CutSceneManager>();

        otherInventory.Take  = true;
        playerInventory.Take = false;
        playerInventory.Initialize(playerInventoryManager);

        if (onLoadLevelMessage != string.Empty)
        {
            Invoke(nameof(DisplayMessage), 2 * Time.deltaTime);
        }

        if (GetComponent <Canvas>() && worldCanvas == null)
        {
            worldCanvas = GetComponent <Canvas>();
        }

        if (scenes == null || scenes.Length <= 0)
        {
            scenes = new string[SceneManager.sceneCountInBuildSettings];

            for (int index = 0; index < SceneManager.sceneCountInBuildSettings; index++)
            {
                var path      = SceneUtility.GetScenePathByBuildIndex(index);
                var sceneName = System.IO.Path.GetFileNameWithoutExtension(path);

                scenes[index] = sceneName;
            }
        }
    }
Exemplo n.º 25
0
    private void Awake()
    {
        // 配置
        GeneralConfig.Init();
        // 控制台
        Console.Init();
        // AB工具
        ABUtility.Init();
        Instance = this;
        Assert.raiseExceptions = true;
        DontDestroyOnLoad(gameObject);
        m_Mgrs        = new List <IManager>();
        m_CallMgr     = new CallManager();
        m_ObjectMgr   = new ObjectManager();
        m_ABMgr       = new ABManager();
        m_HotPatchMgr = new HotPatchManager();
        m_LuaMgr      = new LuaManager();
        m_ResMgr      = new ResourceManager();
        m_CutSceneMgr = new CutSceneManager();
        m_UIMgr       = new UIManager();
        m_Mgrs.Add(m_CallMgr);
        m_Mgrs.Add(m_ABMgr);
        m_Mgrs.Add(m_LuaMgr);
        m_Mgrs.Add(m_CutSceneMgr);
        m_Mgrs.Add(m_ResMgr);
        m_Mgrs.Add(m_ObjectMgr);
        m_Mgrs.Add(m_UIMgr);
        m_Mgrs.Add(m_HotPatchMgr);

        var iter = m_Mgrs.GetEnumerator();

        while (iter.MoveNext())
        {
            iter.Current.Awake();
        }
    }
Exemplo n.º 26
0
 private void Awake()
 {
     instance = this;
     GetCutScene();
 }
Exemplo n.º 27
0
 private void Awake()
 {
     inst = this;
 }
Exemplo n.º 28
0
 // Use this for initialization
 void Start()
 {
     touchCount = 0;
     cutSceneManager = GameObject.Find ("Main Camera").GetComponent<CutSceneManager> ();
 }
 void Awake()
 {
     cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
 }
Exemplo n.º 30
0
 void Awake()
 {
     instance     = this;
     myImage      = gameObject.GetComponent <Image> ();
     backingImage = GameObject.Find("Backing Image").GetComponent <Image> ();
 }
Exemplo n.º 31
0
 // Use this for initialization
 void Start()
 {
     CSM = new CutSceneManager();
     SM = new StageManager();
 }
Exemplo n.º 32
0
 private void Awake()
 {
     inputDelay = inputDelayDuration;
     Inst       = this;
 }
Exemplo n.º 33
0
 private void Start()
 {
     DM  = FindObjectOfType <DialogueManager>();
     CSM = CutSceneManager.instance;
 }
Exemplo n.º 34
0
 // Start is called before the first frame update
 void Start()
 {
     player                 = GameObject.FindGameObjectWithTag("Player");
     cutSceneManager        = GetComponent <CutSceneManager>();
     objectiveCompletedList = new bool[3];
 }
Exemplo n.º 35
0
 private void Start()
 {
     _cutSceneManager = FindObjectOfType <CutSceneManager>();
 }
Exemplo n.º 36
0
        /* Mod loading */
        public override void Load()
        {
            mod = this; // mod

            mod.Logger.Info("Starting loading...");

            /* Try to get steam info */
            try
            {
                usingSteam = Steamworks.SteamAPI.IsSteamRunning();

                if (usingSteam)
                {
                    SteamId = Steamworks.SteamUser.GetSteamID().m_SteamID; // klass
                    mod.Logger.Info("Steam login = true");
                }
                else
                {
                    mod.Logger.Warn("Steam login = false");
                }
            }
            catch (Exception e)
            {
                usingSteam = false;
                SteamId    = 0;
                mod.Logger.Warn("Steam login = false");
                mod.Logger.Error(e.Message);
            }

            /* Register hotkeys */
            StandSummonHT        = RegisterHotKey("Summon Stand", "Insert");
            SpecialAbilityHT     = RegisterHotKey("Special ability", "P");
            SwitchStandControlHT = RegisterHotKey("Switch stand control mode", "Home");

            /* Loading special abilities */
            SpecialAbilityManager.Load();
            SpecialAbilityManager.AddAbility("ZaWardo", new ZaWardo());
            SpecialAbilityManager.AddAbility("SCA", new SilverChariotAbility());

            /* Client only loading */
            if (!Main.dedServ)
            {
                /* Interface loading */
                StandInterface = new UserInterface();
                StandoUI       = new StandUI();

                StandoUI.Activate();

                StandInterface.SetState(StandoUI);

                /* Cut scene */
                CutSceneManager.Load();
                CutSceneManager.AddScene("Test", new CutScenes.TestCSc());

                /* Red dolphin shader */
                GameShaders.Misc["RedDolphin"] = new MiscShaderData(new Ref <Effect>(GetEffect("Effects/RedDolphin")), "RedDolphine");

                /* Bonus manager (not needed) */

                /*try
                 * {
                 *  BonusManager.Init();
                 *
                 *  if (BonusManager.UpdateBonuses())
                 *      Logger.Info("Bonuses loaded");
                 *
                 *  BonusManager.UnLoad();
                 * }
                 * catch (Exception e)
                 * {
                 *  mod.Logger.Warn("DB error: " + e.Message);
                 * }*/
            }

            mod.Logger.Info("Load successful");
        }
 public void OnCutSceneManagerDone(CutSceneManager CutSceneManager)
 {
     InitiateCharacterPickerDelayed();
 }
Exemplo n.º 38
0
 void Start()
 {
     CSM = CutSceneManager.instance;
 }
Exemplo n.º 39
0
    // Use this for initialization
    void Start()
    {
        //Singleton
        if (uniqueInstance == null)
            uniqueInstance = this;
        else
            Destroy(this.gameObject);
        nav = plDum.GetComponent<NavMeshAgent>();

        nav.updateRotation = false;

        Vector3 curPos = plDum.transform.position;
        Vector3 prevPos = plDum.transform.position;
    }
Exemplo n.º 40
0
 void Awake()
 {
     cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
     mechanics = transform.parent.GetComponent<MechStageMechanics>();
     IsMoving = false;
 }