Exemple #1
0
        public static GameObject TurnIntoReplicator(MenuCommand command)
        {
            MARSSession.EnsureRuntimeState();
            EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs {
                label = k_TurnIntoReplicator
            });
            var go = TurnIntoInContext(command, k_ReplicatorLabel, typeof(Replicator));

            return(RegisterUndoAndSelect(go, "Turned into Replicator"));
        }
Exemple #2
0
        public static GameObject CreateRulesetObject(MenuCommand command)
        {
            MARSSession.EnsureRuntimeState();
            EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs {
                label = k_CreateRulesetObjectLabel
            });
            var go = CreateInContext(command, k_RuleSetLabel, new Type[] { typeof(Rules.ProxyRuleSet) });

            return(RegisterUndoAndSelect(go, "Create Rule Set"));
        }
Exemple #3
0
        public static GameObject TurnIntoProxyObject(MenuCommand command)
        {
            MARSSession.EnsureRuntimeState();
            EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs {
                label = k_TurnIntoProxy
            });
            var go = TurnIntoInContext(command, k_ProxyLabel, k_ProxyObjectBaseComponents);

            return(RegisterUndoAndSelect(go, "Turned into Proxy"));
        }
Exemple #4
0
        public static GameObject TurnIntoProxyPlane(MenuCommand command)
        {
            MARSSession.EnsureRuntimeState();
            EditorEvents.CreationMenuItemUsed.Send(new MarsMenuEventArgs {
                label = k_TurnIntoProxyPlane
            });
            var types = k_ProxyObjectBaseComponents.ToList();

            types.Add(typeof(PlaneSizeCondition));
            types.Add(typeof(AlignmentCondition));
            var go = TurnIntoInContext(command, k_ProxyLabel, types.ToArray());

            go.GetComponent <PlaneSizeCondition>().maxBounded = false;
            return(RegisterUndoAndSelect(go, "Turned into Proxy Plane"));
        }
Exemple #5
0
 public static GameObject CreateMARSSessionObject(MenuCommand command)
 {
     MARSSession.EnsureRuntimeState();
     return(MARSSession.Instance.gameObject);
 }