Пример #1
0
        public static void LoadContentStatic()
        {
            texture0cw  = ComponentsManager.LoadTexture("Components/Coil/Coil0cw");
            texture90cw = ComponentsManager.LoadTexture("Components/Coil/Coil90cw");

            MFAOE = ComponentsManager.LoadTexture("Components/AOE");
        }
Пример #2
0
 public static void LoadContentStatic()
 {
     texture0cw   = ComponentsManager.LoadTexture("Components/Delayer/Delayer0cw");
     texture90cw  = ComponentsManager.LoadTexture("Components/Delayer/Delayer90cw");
     texture180cw = ComponentsManager.LoadTexture("Components/Delayer/Delayer180cw");
     texture270cw = ComponentsManager.LoadTexture("Components/Delayer/Delayer270cw");
 }
Пример #3
0
 void Awake()
 {
     components      = GetComponent <ComponentsManager>();
     gameState       = GetComponent <GameStateManager>();
     spawningObjects = GetComponent <SpawningObjectsManager>();
     gamePreferences = GetComponent <GamePreferencesManager>();
 }
Пример #4
0
 public static void LoadContentStatic()
 {
     texture0cw           = ComponentsManager.LoadTexture("Components/Button/Button0cw");
     texture90cw          = ComponentsManager.LoadTexture("Components/Button/Button90cw");
     textureConnected0cw  = ComponentsManager.LoadTexture("Components/Button/ButtonConnected0cw");
     textureConnected90cw = ComponentsManager.LoadTexture("Components/Button/ButtonConnected90cw");
 }
Пример #5
0
 public static void LoadContentStatic()
 {
     texture0cw   = ComponentsManager.LoadTexture("Components/Diode/Diode0cw");
     texture90cw  = ComponentsManager.LoadTexture("Components/Diode/Diode90cw");
     texture180cw = ComponentsManager.LoadTexture("Components/Diode/Diode180cw");
     texture270cw = ComponentsManager.LoadTexture("Components/Diode/Diode270cw");
 }
Пример #6
0
 public static void LoadContentStatic()
 {
     texture0cw   = ComponentsManager.LoadTexture("Components/Ground/Ground0cw");
     texture90cw  = ComponentsManager.LoadTexture("Components/Ground/Ground90cw");
     texture180cw = ComponentsManager.LoadTexture("Components/Ground/Ground180cw");
     texture270cw = ComponentsManager.LoadTexture("Components/Ground/Ground270cw");
 }
Пример #7
0
 public virtual void CheckTag(string s, ComponentsManager manager, GameObject obj)
 {
     if (s == nameTag)
     {
         DoAction(manager, obj);
     }
 }
Пример #8
0
 void Awake()
 {
     died           = false;
     SpawnProtected = true;
     manager        = GetComponent <ComponentsManager>();
     Invoke("NoMoreSpawnProtection", 2.0f);
 }
Пример #9
0
    public bool Initialize(Transform weap)
    {
        try
        {
            Weapon = weap;

            Lights = new List <Transform>();

            Transform LightHolder = weap.Find("Lights");
            for (int i = 0; i < LightHolder.childCount; i++)
            {
                Lights.Add(LightHolder.GetChild(i));
                Lights[i].gameObject.SetActive(false);
            }

            componentsManager = Weapon.root.GetComponent <ComponentsManager>();
            weaponAnimator    = weap.GetComponent <Animator>();

            return(true);
        }
        catch
        {
            Debug.Log("failed while adding transforms");
            return(false);
        }
    }
Пример #10
0
    void Awake()
    {
        Quaternion parentRotInv = Quaternion.Inverse(transform.root.rotation);

        Rotation = parentRotInv * Spine.rotation;
        manager  = GetComponent <ComponentsManager>();
    }
Пример #11
0
 public static void LoadContentStatic()
 {
     texture0cw  = ComponentsManager.LoadTexture("Components/Motor/Motor0cw");
     texture90cw = ComponentsManager.LoadTexture("Components/Motor/Motor90cw");
     overlay0cw  = ComponentsManager.LoadTexture("Components/Motor/MotorOverlay0cw");
     overlay90cw = ComponentsManager.LoadTexture("Components/Motor/MotorOverlay90cw");
 }
Пример #12
0
 public override void AddComponentToManager()
 {
     //ComponentsManager.Remove(this);
     ID = ComponentsManager.GetFreeID();
     //ComponentsManager.Add(this);
     base.AddComponentToManager();
 }
Пример #13
0
 public static void LoadContentStatic()
 {
     texture0cw           = ComponentsManager.LoadTexture("Components/Switch/Switch0cw");
     texture90cw          = ComponentsManager.LoadTexture("Components/Switch/Switch90cw");
     textureConnected0cw  = ComponentsManager.LoadTexture("Components/Switch/SwitchConnected0cw");
     textureConnected90cw = ComponentsManager.LoadTexture("Components/Switch/SwitchConnected90cw");
 }
Пример #14
0
 public static void LoadContentStatic()
 {
     texture0cw   = ComponentsManager.LoadTexture("Components/PowerAC/PowerAC0cw");
     texture90cw  = ComponentsManager.LoadTexture("Components/PowerAC/PowerAC90cw");
     texture180cw = ComponentsManager.LoadTexture("Components/PowerAC/PowerAC180cw");
     texture270cw = ComponentsManager.LoadTexture("Components/PowerAC/PowerAC270cw");
 }
Пример #15
0
        public static void LoadContentStatic()
        {
            texture = ComponentsManager.LoadTexture("Components/4SegmentDisplay");
            mask    = ComponentsManager.LoadTexture("Components/4SegmentDisplayMask");

            LECAOE = ComponentsManager.LoadTexture("Components/AOE");
        }
Пример #16
0
        public override void CircuitUpdate()
        {
            var   s   = parent.Graphics.GetSizeRotated(parent.ComponentRotation) / 2;
            var   p   = parent.Graphics.Position;
            var   par = parent as HES;
            float t   = (float)ComponentsManager.GetMagneticField(p.X + s.X, p.Y + s.Y).Length() / par.MaxMagnetForce;

            t = t > 1 ? 1 : t < 0 ? 0 : t;
            double old = par.Joints[0].SendingVoltage;

            //par.Joints[0].SendingCurrent = par.MaxCurrent * t;
            par.Joints[0].SendingVoltage = par.MaxVoltage * t;
            par.Joints[1].SendingVoltage = par.Joints[0].SendingVoltage;
            par.Joints[2].SendingVoltage = par.Joints[0].SendingVoltage;
            par.Joints[3].SendingVoltage = par.Joints[0].SendingVoltage;

            if (Math.Abs(par.Joints[0].SendingVoltage - old) > 0.05f)
            {
                MicroWorld.Logics.CircuitManager.ScheduleReupdate(par.Joints[0]);
                MicroWorld.Logics.CircuitManager.ScheduleReupdate(par.Joints[1]);
                MicroWorld.Logics.CircuitManager.ScheduleReupdate(par.Joints[2]);
                MicroWorld.Logics.CircuitManager.ScheduleReupdate(par.Joints[3]);
            }

            base.CircuitUpdate();
        }
Пример #17
0
 void Awake()
 {
     manager = GetComponent <ComponentsManager>();
     for (int i = 0; i < 4; i++)
     {
         dashDoubleHits.Add(new DoubleHitClass());
     }
 }
Пример #18
0
        public static void LoadContentStatic()
        {
            texture0cw = ComponentsManager.LoadTexture("Components/SignalSplitter/SignalSplitter0cw");

            textureTop0cw = ComponentsManager.LoadTexture("Components/SignalSplitter/SignalSplitterTop0cw");

            textureBottom0cw = ComponentsManager.LoadTexture("Components/SignalSplitter/SignalSplitterBottom0cw");
        }
Пример #19
0
 public static void LoadContentStatic()
 {
     cog          = ComponentsManager.LoadTexture("Components/Mover/Cog");
     texture0cw   = ComponentsManager.LoadTexture("Components/Mover/Base0cw");
     texture90cw  = ComponentsManager.LoadTexture("Components/Mover/Base90cw");
     texture180cw = ComponentsManager.LoadTexture("Components/Mover/Base180cw");
     texture270cw = ComponentsManager.LoadTexture("Components/Mover/Base270cw");
 }
Пример #20
0
 void Awake()
 {
     manager = GetComponent <ComponentsManager>();
     if (!networkView.isMine)
     {
         MecaAnimatorController.SetBool("LocalPlayer", false);
     }
 }
Пример #21
0
    // Use this for initialization
    void Start()
    {
        boxCollider = GetComponent <BoxCollider> ();
        boxBounds   = boxCollider.bounds;

        bombManager = bomb.GetComponent <ComponentsManager> ();
        toolCaseStatusManager.CaseClose += SendMessageIfTakeIn;
    }
Пример #22
0
        public static void LoadContentStatic()
        {
            textureBg = ComponentsManager.LoadTexture("Components/Hub/HubBg0cw");

            textureLeft  = ComponentsManager.LoadTexture("Components/Hub/HubLeft0cw");
            textureUp    = ComponentsManager.LoadTexture("Components/Hub/HubUp0cw");
            textureRight = ComponentsManager.LoadTexture("Components/Hub/HubRight0cw");
            textureDown  = ComponentsManager.LoadTexture("Components/Hub/HubDown0cw");
        }
Пример #23
0
    public void Init()
    {
        m_listItem.GetComponent <RectTransform>().
        SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, m_itemHeight);
        ComponentsManager manager = GameObject.FindGameObjectWithTag(ComponentsManager.SELF_TAG).GetComponent <ComponentsManager>();

        m_paths.AddRange(manager.m_data.MusicPaths);
        FreshMusicList();
    }
Пример #24
0
    /// <summary>
    /// initialization
    /// </summary>
    protected void Start()
    {
        ComponentsManager manager = GameObject.FindGameObjectWithTag(ComponentsManager.SELF_TAG).GetComponent <ComponentsManager>();

        m_audio = manager.m_audio;
        m_audio.BufferLength  = m_spectrumSize;
        m_leftChannelSamples  = new float[(int)m_spectrumSize];
        m_rightChannelSamples = new float[(int)m_spectrumSize];
    }
Пример #25
0
        public static void LoadContentStatic()
        {
            texture0cw   = ComponentsManager.LoadTexture("Components/VoltageGraph/VoltageGraph0cw");
            texture90cw  = ComponentsManager.LoadTexture("Components/VoltageGraph/VoltageGraph90cw");
            texture180cw = ComponentsManager.LoadTexture("Components/VoltageGraph/VoltageGraph180cw");
            texture270cw = ComponentsManager.LoadTexture("Components/VoltageGraph/VoltageGraph270cw");

            font = ResourceManager.LoadSpriteFont("Fonts/LiberationSans_7");
        }
Пример #26
0
        public override void CircuitUpdate()
        {
            var g = parent.Graphics as Graphics.ReedSwitchGraphics;
            var s = g.GetSizeRotated(parent.ComponentRotation);
            var a = ComponentsManager.GetMagneticField(g.Position.X + s.X / 2, g.Position.Y + s.Y / 2);

            (parent as ReedSwitch).W.IsConnected = a.Length() >= RequiredField;

            base.CircuitUpdate();
        }
Пример #27
0
        public ConfigurationsController(
            ConfigurationsManager configurationsManager,
            ComponentsManager componentsManager)
        {
            this.configurationsManager =
                configurationsManager ?? throw new ArgumentNullException(nameof(configurationsManager));

            this.componentsManager =
                componentsManager ?? throw new ArgumentNullException(nameof(componentsManager));
        }
Пример #28
0
    public void UpdateSaveData()
    {
        ComponentsManager manager = GameObject.FindGameObjectWithTag(ComponentsManager.SELF_TAG).GetComponent <ComponentsManager>();

        m_data.playingMusicNamePath = manager.m_audio.CurrentSongPath;
        m_data.musicProgressValue   = manager.m_audio.CurrentTime;
        m_data.volume     = manager.m_audio.Volume;
        m_data.themeName  = Theme;
        m_data.fullScreen = Screen.fullScreen;
    }
Пример #29
0
        public static void LoadContentStatic()
        {
            texture0cw  = ComponentsManager.LoadTexture("Components/Lamp/Lamp0cw");
            texture90cw = ComponentsManager.LoadTexture("Components/Lamp/Lamp90cw");

            textureOn0cw  = ComponentsManager.LoadTexture("Components/Lamp/LampOn0cw");
            textureOn90cw = ComponentsManager.LoadTexture("Components/Lamp/LampOn90cw");

            LECAOE = ComponentsManager.LoadTexture("Components/AOE");
        }
Пример #30
0
 private void Awake()
 {
     gameState            = GetComponent <GameStateManager>();
     prefabs              = GetComponent <PrefabsManager>();
     uI                   = GetComponent <UIManager>();
     serializationManager = SerializationManager.Instance;
     drawNumber           = GetComponent <DrawNumberManager>();
     sprites              = GetComponent <SpritesManager>();
     components           = GetComponent <ComponentsManager>();
 }