예제 #1
0
    private void OnMimicCreated(MimicEntity entity)
    {
        GameObject go =
            ArchetypeLibrary.Instance.Instantiate(
                entity.State.ArchetypeId);

        MimicEntityBehaviour obj =
            go.GetComponent <MimicEntityBehaviour>();

        obj.Entity = entity;
    }
예제 #2
0
        private void OnControllerAdded(IRailControllerServer controller)
        {
            ControlledEntity controlled = this.server.AddNewEntity <ControlledEntity>();

            controlled.State.ArchetypeId = 0;
            controller.GrantControl(controlled);
            controller.ScopeEvaluator = new GameScopeEvaluator(controlled);
            controller.UserData       = controlled;

            MimicEntity mimic = this.server.AddNewEntity <MimicEntity>();

            mimic.State.ArchetypeId = 2;
            mimic.Bind(controlled, 3.5f, 0.0f);
        }