Пример #1
0
        void moveactor(Hashtable param)
        {
//			Debug.Log( "OnMoveActor" );
            string actorName = param["name"] as string;
            string position  = param["position"] as string;

#if true
            GameObject go = GameObject.Find(actorName);
            if (go == null)
            {
//				Debug.LogWarning( "Actor name :" + actorName + " Object not found." );
                return;
            }
#else
            GameObject go = null;
            if (m_ActorGOMap.ContainsKey(actorName))
            {
                go = m_ActorGOMap[actorName];
                if (go == null)
                {
                    Debug.LogWarning("Actor name :" + actorName + " Object not found.");
                    return;
                }
            }
#endif
            Vector3       toPos = go.transform.localPosition;
            ActorPosition pos   = ActorUtility.GetActorPosition(position);
            toPos.x = GetPositionX(pos);
//			Debug.Log( "to :" + pos + " , value:" + toPos.x );
            AnimationNode.MoveTo(go, toPos, 1f);
//			TweenPosition.Begin( go , 1f , toPos );
//			iTween.MoveTo( go , toPos , 1f );
        }
Пример #2
0
        // Actor Event.

        /// <summary>
        /// Raises the enter actor event.
        /// </summary>
        /// <param name='param'>
        /// Parameter.
        /// </param>
        void enteractor(Hashtable param)
        {
            if (actorLib != null)
            {
                bool fadein = false;
                if (param.ContainsKey("fade"))
                {
                    string fade = param["fade"] as string;
                    fadein = (fade == "true") ? true : false;
                }
                // Fade in Start ?.
                ISpriteFactory._FADEIN_AT_CREATE = fadein;

                string actorName = param["name"] as string;
                string position  = param["position"] as string;

                ActorPosition pos = ActorUtility.GetActorPosition(position);

//				Debug.Log( "OnEnterActor :" + actorName );
                OnEnterActor(actorName, pos);
            }
        }