示例#1
0
        public virtual void Start()
        {
            if (IsPhysicsEnabled)
            {
                RecreatePhysics();
            }

            Input.RegisterListener(OnInputEvent);

            int count = m_components.Count;

            for (int i = 0; i < count; i++)
            {
                m_components[i].Start();
            }

            if (UpdateScriptEvent.HasHandlers())
            {
                m_updateScope = World.UpdateScheduler.Connect(Update, EUpdatePriority.Default);
            }

            StartScriptEvent.Invoke();
        }
示例#2
0
 public void Update(float deltaTime)
 {
     UpdateScriptEvent.Invoke(deltaTime, this);
 }