示例#1
0
    public Fish(double x, double y, string bodyLeft, string bodyRight, Fishtank container)
    {
        xPosition    = x;
        yPosition    = y;
        fishtank     = container;
        facingLeft   = true;
        xDestination = (int)x;
        yDestination = (int)y;
        xSpeed       = 0.2;
        ySpeed       = 0.1;
        idleTimer    = 0;
        bubbleTimer  = 0;

        bodyCharsLeft  = new List <char>();
        bodyCharsRight = new List <char>();

        foreach (var c in bodyLeft)
        {
            bodyCharsLeft.Add(c);
        }

        foreach (var c in bodyRight)
        {
            bodyCharsRight.Add(c);
        }
    }
示例#2
0
 public Bubble(double x, double y, Fishtank container)
 {
     xPosition   = x;
     yPosition   = y;
     fishtank    = container;
     changeTimer = 0;
     displayChar = 'O';
 }
示例#3
0
    private void Awake()
    {
        GameObject fishtankGO = GameObject.Find("fishtank");

        fishtankScript = fishtankGO.GetComponent <Fishtank>();

        if (!fishtankScript.gameSettingsManager.transitionMaterials)
        {
            monomerRenderer.material        = legacyMaterial;
            monomerRenderer.material.shader = legacyShader;
        }
    }
示例#4
0
    private void Start()
    {
        if (fishtank != null)
        {
            fishtank = GameObject.Find("fishtank").GetComponent <Fishtank>();
        }
        DecrementPh(amountToDecrementPh);

        if (handTest)
        {
            pHSlider.SetPhToMin();
        }
    }
示例#5
0
    void Awake()
    {
        velEst   = GetComponent <VelocityEstimator>();
        fishtank = transform.parent;
        GameObject fishtankGO = GameObject.Find("fishtank");

        fishtankScript = fishtankGO.GetComponent <Fishtank>();

        if (!fishtankScript.gameSettingsManager.transitionMaterials)
        {
            dimerRenderer.material        = legacyMaterial;
            dimerRenderer.material.shader = legacyShader;
        }
    }
示例#6
0
 private void Awake()
 {
     //partyModeSwitch = FindObjectOfType<PartyModeSwitch>();
     //if (!partyModeSwitch)
     //{
     //	Debug.Log("showDonut can't find PartyModeSwitch");
     //}
     myFishtank = FindObjectOfType <Fishtank>();
     myRing     = myRingGO.GetComponent <Ring>();
     if (!myFishtank)
     {
         Debug.Log("showDonut can't find Fishtank");
     }
     small  = donut.transform.localScale * .9f;
     medium = donut.transform.localScale;
     big    = donut.transform.localScale * 1.1f;
 }
示例#7
0
        public void PartyModeSetUp()
        {
            // TODO: the set up for fishtank to be tested is massive since it's not segmented and relies on a tonne of non-null variables. Will just use the playmode test script to test play mode features.
            fishtankGo = GameObject.Instantiate(new GameObject());
            fishtank   = fishtankGo.AddComponent <Fishtank>();

            // setting up fishtank variables required.
            fishtank.pHSliderUI      = EmptyGo();
            fishtank.cartoonRenderUI = EmptyGo();
            fishtank.fishtankScaleUI = EmptyGo();
            fishtank.partyModeUi     = EmptyGo();
            fishtank.simulationUI    = EmptyGo();
            fishtank.nanoUI          = EmptyGo();

            // creating party mode switch and setting reference to fishtank
            partyModeSwitchGo             = GameObject.Instantiate(new GameObject()); partyModeSwitch = partyModeSwitchGo.AddComponent <PartyModeSwitch>();
            partyModeSwitch.linearMapping = partyModeSwitchGo.AddComponent <LinearMapping>();
            fishtank.partyModeSwitch      = partyModeSwitch;
        }
示例#8
0
    void Awake()
    {
        velocityEstimator = GetComponent <VelocityEstimator>();
        fishtank          = transform.parent;
        GameObject fishtankGO = GameObject.Find("fishtank");

        fishTank = fishtankGO.GetComponent <Fishtank>();

        var myElectric01 = Instantiate(goElectric01, gameObject.transform);

        psElectric01 = myElectric01.GetComponentInChildren <ParticleSystem>();
        psElectric01.transform.localScale = fishTank.nanowireFxScale * fishtankGO.transform.localScale;

        if (true)
        {
            var myAccretion01 = Instantiate(goAccretion01, gameObject.transform);

            psAccretion01 = myAccretion01.GetComponentInChildren <ParticleSystem>();
            psAccretion01.transform.localScale = fishTank.nanowireFxScale * fishtankGO.transform.localScale;

            psAccretion01Emission = psAccretion01.emission;
            psAccretion01Emission.rateOverTime = psAccretion01EmissionRateInit;
        }

        if (true)         //(fishtankScript.ringsUseSpringConstraints)
        {
            // warrick: disabled for now
            // InitialiseSpringJoints();
        }

        ringAudioSource      = GetComponent <AudioSource>();
        ringAudioSource.clip = sfxRingSpawn;
        ringAudioSource.loop = false;
        ringAudioSource.Play();

        if (!fishTank.gameSettingsManager.transitionMaterials)
        {
            SetMaterialAndShadersToLegacy();
        }
    }
示例#9
0
 public Bubble(Fishtank container) : this(0, 0, container)
 {
 }
示例#10
0
 public Fish(Fishtank container) : this(0, 0, "", "", container)
 {
 }
示例#11
0
 public void DestroyFishtank()
 {
     // fishtank = new Fishtank();
     fishtank = null;
 }
示例#12
0
 public void SetUpFishtank()
 {
     fishtankGo = SpawnEmptyGo();
     fishtank   = fishtankGo.AddComponent <Fishtank>();
 }