Inheritance: GetATMData
コード例 #1
0
        // Use this for initialization
        void OnEnable()
        {
            Debug.Log ("------------------");
            Debug.Log ("PROXY DESIGN PATTERN");

            GetATMData realATMMachine = new ATMMachine();
            GetATMData atmProxy = new ATMProxy();
            Debug.Log ("Current State: " + atmProxy.GetCurrentState());
            Debug.Log ("Current Cash in Machine: " + atmProxy.GetCashInMachine());

            //atmProxy.setCashInMachine << not possible because not defined in the interface
        }
コード例 #2
0
        // Use this for initialization
        void OnEnable()
        {
            Debug.Log("------------------");
            Debug.Log("PROXY DESIGN PATTERN");

            GetATMData realATMMachine = new ATMMachine();
            GetATMData atmProxy       = new ATMProxy();

            Debug.Log("Current State: " + atmProxy.GetCurrentState());
            Debug.Log("Current Cash in Machine: " + atmProxy.GetCashInMachine());

            //atmProxy.setCashInMachine << not possible because not defined in the interface
        }