Exemple #1
0
 protected override void Start()
 {
     base.Start ();
     EventService.Register<AttachBalloonDelegate>(EGameEvent.ATTACH_BALLOON, OnAttachBalloon);
     mDetachBehavior = GetComponent<DetachBehavior> ();
     mAttachBehavior = GetComponent<AttachBehavior> ();
 }
Exemple #2
0
    protected override void Start()
    {
        base.Start ();
        EventService.Register<BalloonDelegate>(EGameEvent.TRIGGER_BALLOON, OnTriggerBalloon);
        mAttachBehavior = GetComponent<AttachBehavior> ();

        mCustomizedGasTrail = m_GasTrail;
        mCustomizedGasTrail.GetComponent<ParticleSystem> ().startColor = mBalloon.SpriteRenderer.color;
        Debug.Log ("mCustomizedGasTrail has been instanced");
        mParticleGenerator = mBalloon.gameObject.AddComponent<ParticleSystem> ();
        mParticleGenerator.enableEmission = false;
    }
Exemple #3
0
        void ExecuteAttach(AttachKind kind, IRibbonControl control, AttachBehavior behavior)
        {
            try
            {
                var inspector = control.Context as Outlook._Inspector;
                if (inspector != null)
                {
                    inspector = OutlookApp.ActiveInspector();
                }
                if (inspector != null)
                {
                    using (var mi = app.GetItemByInspector(inspector))
                    {
                        Marshal.ReleaseComObject(inspector);
                        if (mi != null)
                        {
                            switch (behavior)
                            {
                            case AttachBehavior.Send:
                                executeAttachOnSend[mi] = new AttachOnSendParameters {
                                    AttachKind = kind
                                };
                                try
                                {
                                    mi.Send();
                                }
                                finally
                                {
                                    executeAttachOnSend.Remove(mi);
                                }
                                break;

                            case AttachBehavior.SyncAttach:
                                ClassFactory.Instance.EmailAttachProcessor.ExecuteAttach(kind, mi);
                                break;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ShowEx(ex);
            }
        }