コード例 #1
0
ファイル: ChatBubbleWnd.cs プロジェクト: zwong91/Titan
        public bool setData(ChatBubbleWndView view, uint uid, SChatMessageInfo info)
        {
            base.setData(info);

            m_View  = view;
            m_UID   = uid;
            m_Pdbid = info.senderPdbid;

            // 实体气泡,则更新位置
            m_EntityView = EntityFactory.getEntityViewByID((int)uid);

            // uid获取失败,则使用pdbid
            if (m_EntityView == null)
            {
                m_EntityView = getEntityViewByPdbid(info.senderPdbid);
            }

            if (m_EntityView == null || !m_EntityView.IsValid)
            {
                return(false);
            }

            m_EntryProperty = m_EntityView.GetComponent <CreatureProperty>();
            if (m_EntryProperty == null)
            {
                return(false);
            }

            // 设置初始位置
            updatePosition();

            return(true);
        }
コード例 #2
0
        public override void Execute()
        {
            var trailRenderer = EntityView.GetComponent<UnityEngine.TrailRenderer>();
            var tweener = trailRenderer.DOResize(StartSize, EndSize, Duration);
            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #3
0
        public override void Execute()
        {
            var rigidbody = EntityView.GetComponent <Rigidbody>();
            var tweener   = rigidbody.DOMove(Destination, Duration, UseSnapping);

            tweener.Pause();

            CreatedTween = tweener;
        }
        public override void Execute()
        {
            var rigidbody = EntityView.GetComponent <Rigidbody>();
            var tweener   = rigidbody.DOLookAt(LookAt, Duration, AxisConstraint);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #5
0
        public override void Execute()
        {
            var light   = EntityView.GetComponent <Light>();
            var tweener = light.DOIntensity(Intensity, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #6
0
        public override void Execute()
        {
            var rigidbody = EntityView.GetComponent <Rigidbody>();
            var tweener   = rigidbody.DORotate(Rotation, Duration, RotateMode);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #7
0
        public override void Execute()
        {
            var audioSource = EntityView.GetComponent <AudioSource>();
            var tweener     = audioSource.DOFade(Fade, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #8
0
        public override void Execute()
        {
            var renderer = EntityView.GetComponent <Renderer>();
            var tweener  = renderer.material.DOFade(Opacity, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }
        public override void Execute()
        {
            var light   = EntityView.GetComponent <Light>();
            var tweener = light.DOShadowStrength(ShadowStrength, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #10
0
        public override void Execute()
        {
            var renderer = EntityView.GetComponent <Renderer>();
            var tweener  = renderer.material.DOColor(NewColour, PropertyName, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }
コード例 #11
0
        public override void Execute()
        {
            var startColour  = new Color2(StartColour, StartColour);
            var endColour    = new Color2(EndColour, EndColour);
            var lineRenderer = EntityView.GetComponent <UnityEngine.LineRenderer>();
            var tweener      = lineRenderer.DOColor(startColour, endColour, Duration);

            tweener.Pause();

            CreatedTween = tweener;
        }