Inheritance: MonoBehaviour
Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     readyManager   = GameObject.Find("ReadyManager").GetComponent <ReadyManager>();
     publicVariable = GameObject.Find("PublicVariable").GetComponent <PublicVariable>();
     ReadyButton.onClick.AddListener(readyFunc);
     MaSangButton.onClick.AddListener(masangFunc);
     CancelButton.onClick.AddListener(cancelFunc);
     FixYesButton.onClick.AddListener(fixYesFunc);
     FixNoButton.onClick.AddListener(fixNoFunc);
     ExitButton.onClick.AddListener(exitFunc);
     ExitButton2.onClick.AddListener(exitFunc);
     MSMSButton.onClick.AddListener(msmsFunc);
     MSSMButton.onClick.AddListener(mssmFunc);
     SMSMButton.onClick.AddListener(smsmFunc);
     SMMSButton.onClick.AddListener(smmsFunc);
 }
    // Start is called before the first frame update
    public virtual void GeneralInit()
    {
        var StateMachine = new CStateMachine <GameManager>();

        m_cStateMachineList.Add(StateMachine);

        var Ready    = new ReadyManager(this);
        var GameMain = new GameMainManager(this);
        var End      = new EndManager(this);

        m_cStateList.Add(Ready);
        m_cStateList.Add(GameMain);
        m_cStateList.Add(End);



        m_cStateMachineList[0].ChangeState(m_cStateList[(int)NowManagerState]);
    }
Beispiel #3
0
    void Awake()
    {
        config.Load();

        if (networkView == null)
        {
            gameObject.AddComponent <NetworkView>();
        }
        networkView.stateSynchronization = NetworkStateSynchronization.Off;
        networkView.observed             = null;

        option     = ComponentHelper.AddComponentIfNotExists <OptionManager>(gameObject);
        sound      = ComponentHelper.AddComponentIfNotExists <SoundManager>(gameObject);
        server     = ComponentHelper.AddComponentIfNotExists <ServerManager>(gameObject);
        player     = ComponentHelper.AddComponentIfNotExists <PlayerManager>(gameObject);
        ready      = ComponentHelper.AddComponentIfNotExists <ReadyManager>(gameObject);
        transition = ComponentHelper.AddComponentIfNotExists <TransitionManager>(gameObject);
    }
Beispiel #4
0
    private void OnEnable()
    {
        StartCoroutine(Logo());
        PhotonNetwork.isMessageQueueRunning = true;
        pv                 = GetComponent <PhotonView>();
        easyTween          = GetComponent <EasyTween>();
        readyManager       = FindObjectOfType <ReadyManager>();
        dayNightController = GetComponent <DayNightController>();

        localCam    = readyManager.localCam;
        localPlayer = readyManager.localPlayer;
        localPlayer.GetComponent <JobManager>().enabled = true;
        thirdPersonUserControl = readyManager.thirdPersonUserControl;
        freeLookCam            = readyManager.freeLookCam;


        if (PhotonNetwork.player.IsMasterClient)
        {
            SetPlayerJob();
        }
    }
    // please implement this.

    /*
     * [HideInInspector]
     * public CacheManager networkCache = new
     */

    void Awake()
    {
        context = new ContextManager();
        random  = new System.Random();

        if (networkView == null)
        {
            gameObject.AddComponent <NetworkView>();
        }
        networkView.stateSynchronization = NetworkStateSynchronization.Off;
        networkView.observed             = null;

        server = GetComponent <ServerManager>();
        if (server == null)
        {
            server = gameObject.AddComponent <ServerManager>();
        }

        player = GetComponent <PlayerManager>();
        if (player == null)
        {
            player = gameObject.AddComponent <PlayerManager>();
        }

        ready = GetComponent <ReadyManager>();
        if (ready == null)
        {
            ready = gameObject.AddComponent <ReadyManager>();
        }

        transition = GetComponent <TransitionManager>();
        if (transition == null)
        {
            transition = gameObject.AddComponent <TransitionManager>();
        }
    }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     instance = this;
 }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     spRender     = GetComponent <SpriteRenderer> ();
     readyManager = FindObjectOfType <ReadyManager> ();
     readyManager.ApplyChange();
 }