コード例 #1
0
        void Start()
        {
            battleEngine = BattleEngine.Instance;
            _gameCamera  = GameCamera.current;

            EventManager.Instance.RegisterEvent <Snaker, object>("OnSnakerDead", OnSnakerDead);
        }
コード例 #2
0
        protected override void OnDestroy()
        {
            battleEngine = null;

            ResetGameCamera();
            _gameCamera = null;

            EventManager.Instance.UnregisterEvent <Snaker, object>("OnSnakerDead", OnSnakerDead);

            base.OnDestroy();
        }