Esempio n. 1
0
        public static void ScheduleCtrlPatchC(
            ScheduleCtrl __instance
            , ref Dictionary <string, ScheduleCtrl.MaidStatusAndTaskUnit> ___m_dicMaidStatusAndTask
            , ref string ___m_deleteSlotNo
            , ref ScheduleMgr ___m_scheduleMgr
            , ref ScheduleScene ___m_scheduleApi
            , ref CharacterSelectManager ___m_charSelMgr
            , ref ScheduleCtrl.ExclusiveViewer ___m_currentActiveViewer
            )
        {
            MyLog.LogMessage(
                "ScheduleCtrlPatchC"
                );

            instance     = __instance;
            hGetMaidName = AccessTools.Method(typeof(ScheduleCtrl), "GetMaidName"); // 이건 잘됨
            //hGetMaidBySlotNo = AccessTools.Method(typeof(ScheduleCtrl), "GetMaidBySlotNo"); // 이건 잘됨
            //hSetViewerActive = AccessTools.Method(typeof(ScheduleCtrl), "SetViewerActive"); // 이건 잘됨
            //hSetSelectedRowActive = AccessTools.Method(typeof(ScheduleCtrl), "SetSelectedRowActive"); // 이건 잘됨
            m_dicMaidStatusAndTask = ___m_dicMaidStatusAndTask;
            m_deleteSlotNo         = ___m_deleteSlotNo;
            m_scheduleMgr          = ___m_scheduleMgr;
            m_scheduleApi          = ___m_scheduleApi;
            m_charSelMgr           = ___m_charSelMgr;
            m_currentActiveViewer  = ___m_currentActiveViewer;
        }
    public void SelectThisCharacter()
    {
        CharacterSelectManager csm = GameObject.FindObjectOfType <CharacterSelectManager>();

        if (csm)
        {
            csm.SelectCharacter(this);
        }
    }
Esempio n. 3
0
    void SetController(GameObject obj, int index, CharacterSelectManager csm)
    {
        string str = "Joystick" + (index);

        if (index == 4 && csm.isKeyboardActive)
        {
            str = "";
        }
        obj.GetComponent <Movement>().Initiate(str);
    }
    void Start()
    {
        // get reference and display default
        screensTransitionManager = FindObjectOfType <ScreensTransitionManager>();
        characterSelectManager   = FindObjectOfType <CharacterSelectManager>();
        characterSelectUI.UpdateCharacterDisplayed(characterSelectManager.GetCharacter(characterIndex));
        characterSelectUI.UpdateSelected(playerReady);
        audioSrc = GetComponent <AudioSource>();

        // resets UI when stm.ToTitle() is called
        screensTransitionManager.OnReturnToTitle += ResetUI;
    }
Esempio n. 5
0
    // Start is called before the first frame update
    void Start()
    {
        //Singleton Pattern
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(this.gameObject);
        }

        Initialize();
    }
Esempio n. 6
0
        public override int Update()
        {
            if (player.gamepad.IsDown(Button.D))
            {
                MainGameParameter.instance.players.Remove(player);
                SoundManager.Play(SoundManager.cursor2);
                return((int)STATENAME.Selecting);
            }

            if (player.gamepad.IsDown(Button.A) || player.gamepad.IsDown(Button.Start))
            {
                CharacterSelectManager.ChangeMainScene();
            }

            return((int)STATENAME.Changeless);
        }
Esempio n. 7
0
    private void SetCharacter(GameObject character)
    {
        parent.character = character;

        var box = gameObject.GetComponent <BoxCollider>();

        if (box != null)
        {
            Destroy(box);
        }

        var scale = gameObject.GetComponent <TweenScale>();

        if (scale != null)
        {
            Destroy(scale);
        }
        CharacterSelectManager.AddPlayer(parent);
    }
Esempio n. 8
0
    // Use this for initialization
    void Start()
    {
        Physics.IgnoreLayerCollision(8, 13, false);
        Physics.IgnoreLayerCollision(9, 13, false);
        Physics.IgnoreLayerCollision(10, 13, false);
        Physics.IgnoreLayerCollision(11, 13, false);

        if (GameObject.Find("Music") != null)
        {
            GameObject.Destroy(GameObject.Find("Music"));
        }

        if (GameObject.Find("RealMusic") != null)
        {
            GameObject.Destroy(GameObject.Find("RealMusic"));
        }


        NumPlayers = 0;
        if (GameObject.Find("CharacterSelectManager") != null)
        {
            CharacterSelectManager csm = GameObject.Find("CharacterSelectManager").GetComponent <CharacterSelectManager>();
            PlayerCharacters = csm.SelectedCharacters;
            for (int i = 0; i < PlayerCharacters.Count; i++)
            {
                if (PlayerCharacters[i] != -1)
                {
                    NumPlayers++;
                }
            }
            NumLivePlayers = NumPlayers;
//			print ("Live: " + NumLivePlayers);

            InstantiatePrefabs(csm);

            GameObject.Destroy(csm.gameObject);
        }
        else
        {
            print("Character Select manager is Null");
        }
    }
    // Use this for initialization
    void Start()
    {
        p1LifeBar   = GameObject.Find("P1LifeBar");
        p1BufferBar = GameObject.Find("P1BufferBarSegments");
        p2LifeBar   = GameObject.Find("P2LifeBar");
        p2BufferBar = GameObject.Find("P2BufferBarSegments");
        UIElements  = GameObject.Find("InGameUIElements");
        ToggleUI(false);

        victoryText = GameObject.FindGameObjectWithTag("VictoryText").GetComponent <Text>();

        //bullets = new BulletDepot(); // clearing a warning w/next line - ski
        bullets = ScriptableObject.CreateInstance <BulletDepot>();
        bullets.Load();

        playerFactory         = GetComponent <PlayerInitializer>();
        playerFactory.bullets = bullets;
        player1Controls       = CreateControlScheme(0);
        player2Controls       = CreateControlScheme(1);
        background            = GameObject.FindGameObjectWithTag("Background").GetComponent <SpriteRenderer>();

        characterSelectManager = GetComponent <CharacterSelectManager>();
        int numCharacters = System.Enum.GetNames(typeof(Character)).Length;

        AnalyticsEngine.Initialize(new string[] { "LoholtBulletsFired", "OrpheusBulletsFired", "HirukoBulletsFired" });
        characterSelectManager.Reset();
        currentUpdateFunction = CharacterSelect;
        menuController        = GameObject.Find("Canvas").GetComponent <MenuController>();
        player1Controller     = InputManager.ActiveDevice;
        foreach (InputDevice controller in InputManager.Devices)
        {
            if (controller != InputManager.ActiveDevice)
            {
                player2Controller = controller;
            }
        }
        characterSelectManager.SetControllers(player1Controller, player2Controller);
        //menuController.Toggle();
    }
Esempio n. 10
0
    void InstantiatePrefabs(CharacterSelectManager csm)
    {
        for (int i = 0; i < 4; i++)
        {
            if (PlayerCharacters[i] != -1)
            {
                GameObject obj = Instantiate(CharPrefabs[PlayerCharacters[i]], transform.GetChild(i).position, transform.GetChild(0).rotation);
                PlayerRefs.Add(obj);
                Destroy(transform.GetChild(i).gameObject);
                SetController(obj, i + 1, csm);
                SetCamera(i, obj);
                SetUI(i, obj, PlayerCharacters[i]);
            }
            else
            {
                Destroy(transform.GetChild(i).gameObject);
            }
        }

        /*for(int i = 0; i < 4; i++) {
         *      if(transform.GetChild(i) != null) Destroy(transform.GetChild(i).gameObject);
         * }*/
    }
 private void Awake()
 {
     instance = this;
     DontDestroyOnLoad(gameObject); //GameObject remains active after changing scenes
 }
Esempio n. 12
0
 void Start()
 {
     _originalBorderPos = Border.anchoredPosition; //Save original UI Pos to Unlerp it if Necessary
     _csm    = CharacterSelectManager.Instance;
     _squish = Mouse.GetComponent <Squishy>();
 }
Esempio n. 13
0
 // Use this for initialization
 void Start()
 {
     parent = GetComponentInParent <CharacterSelectManager>();
 }
Esempio n. 14
0
    // Use this for initialization
    void Start()
    {
        GameObject[] HorusWinsIcons;
        GameObject[] SetWinsIcons;

        SetWinsIcons     = GameObject.FindGameObjectsWithTag("SetWinsIcon");
        HorusWinsIcons   = GameObject.FindGameObjectsWithTag("HorusWinsIcon");
        HorusWinsIconsSR = new SpriteRenderer[HorusWinsIcons.Length];
        SetWinsIconsSR   = new SpriteRenderer[SetWinsIcons.Length];
        p1LifeBar        = GameObject.Find("P1LifeBar");
        p1BufferBar      = GameObject.Find("P1BufferBarSegments");
        p2LifeBar        = GameObject.Find("P2LifeBar");
        p2BufferBar      = GameObject.Find("P2BufferBarSegments");
        UIElements       = GameObject.Find("InGameUIElements");
        ToggleUI(false);
        player1Wins = 0;
        player2Wins = 0;
        roundsToWin = 2;

        int j = 0;

        for (int i = 1; i >= 0; i--)
        {
            HorusWinsIconsSR[j] = HorusWinsIcons[i].GetComponent <SpriteRenderer>();
            SetWinsIconsSR[j]   = SetWinsIcons[i].GetComponent <SpriteRenderer>();
            j++;
        }

        timerStarted = false;

        //bullets = new BulletDepot(); // clearing a warning w/next line - ski
        bullets = ScriptableObject.CreateInstance <BulletDepot>();
        bullets.Load();

        playerFactory         = GetComponent <PlayerInitializer>();
        playerFactory.bullets = bullets;
        player1Controls       = CreateControlScheme(0);
        player2Controls       = CreateControlScheme(1);
        currentRoundTime      = roundTime;
        titleLogo             = GameObject.FindGameObjectWithTag("TitleLogo").GetComponent <SpriteRenderer>();
        pressStart            = titleLogo.GetComponent <Text>();
        infoScreen            = GameObject.FindGameObjectWithTag("InfoScreen").GetComponent <SpriteRenderer>();
        background            = GameObject.FindGameObjectWithTag("Background").GetComponent <SpriteRenderer>();
        roundTimer            = GameObject.FindGameObjectWithTag("RoundTimer").GetComponent <Text>();
        victoryText           = GameObject.FindGameObjectWithTag("VictoryText").GetComponent <Text>();

        titleLogo.enabled     = true;
        pressStart.enabled    = true;
        currentUpdateFunction = TitleScreen;

        characterSelectManager = GetComponent <CharacterSelectManager>();
        int numCharacters = System.Enum.GetNames(typeof(Character)).Length;

        string[,] bulletDescriptions = new string[numCharacters, numCharacters];
        for (int i = 0; i < numCharacters; i++)
        {
            bulletDescriptions[i, 0] = bullets.types[i].projectileTypes[1].bulletDescription;
            bulletDescriptions[i, 1] = bullets.types[i].projectileTypes[2].bulletDescription;
            bulletDescriptions[i, 2] = bullets.types[i].projectileTypes[0].bulletDescription;
        }

        AnalyticsEngine.Initialize(new string[] { "LoholtBulletsFired", "OrpheusBulletsFired", "HirukoBulletsFired" });
    }
    // auto-hook to gameplay managers when they show up
    void OnLevelWasLoaded(int level)
    {
        mapGenerator = FindObjectOfType<TileGen>();
        if (mapGenerator != null)
        {
            //mapGenerator.generateFromMap(selectedMap);
        }

        charSelectManager = FindObjectOfType<CharacterSelectManager>();
        reporter = FindObjectOfType<FieldReporter>();
    }
 public void Start()
 {
     cm          = FindObjectOfType <CharacterSelectManager>();
     destination = transform.position;
 }
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }
 void Awake()
 {
     Instance = this;
 }
Esempio n. 19
0
 private void Awake()
 {
     instance = this;
 }
Esempio n. 20
0
 void Start()
 {
     _originalBorderPos = Border.anchoredPosition; //Save original UI Pos to Unlerp it if Necessary
     _csm = CharacterSelectManager.Instance;
 }