コード例 #1
0
            /// <summary>
            /// are you sure you want to construct your own CharacterManager? You may want to use
            /// SceneManager.GetInstance().GetCharacterManager() instead
            /// </summary>
            /// <param name="characterComponent">a character component which houses the relevant prefab
            /// and UI elements</param>
            public CharacterManager(CharacterComponent characterComponent)
            {
                m_characterComponent = characterComponent;

                // assign references to all the relevant character elements
                m_characterPrefab = characterComponent.GetCharacterPrefab();
                m_backgroundPanel = characterComponent.GetBackgroundPanel();
                m_foregroundPanel = characterComponent.GetForegroundPanel();

                // create character transformer for scaling/translation
                m_characterTransformer = new CharacterTransformer();
                m_characters           = new List <GameObject>(); // initialise list of characters
            }
コード例 #2
0
        public CharacterManager(CharacterComponent characterComponent)
        {
            m_characterComponent = characterComponent;


            m_characterPrefab = characterComponent.GetCharacterPrefab();
            m_backgroundPanel = characterComponent.GetBackgroundPanel();
            m_foregroundPanel = characterComponent.GetForegroundPanel();


            m_characterTransformer = new CharacterTransformer();
            m_characters           = new List <GameObject>();
        }