Exemplo n.º 1
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     if (coll.gameObject.tag == "PowerUp")
     {
         PlayerVariables.powerUp();
     }
 }
Exemplo n.º 2
0
 private void GiveCorrespondingItemToTask(Task task)
 {
     if (task.name == "shelter1")
     {
         PlayerVariables.addToInventory("Lv1 Shelter");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
         PlayerVariables.addToInventory("Green Seed");
     }
     if (task.name == "testSoil1")
     {
         PlayerVariables.addToInventory("Dirt Checker");
     }
     if (task.name == "shovelBot")
     {
         PlayerVariables.addToInventory("Shovel Bot");
     }
     if (task.name == "shelter2")
     {
         PlayerVariables.addToInventory("Lv2 Greenhouse");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Brocc Seed");
         PlayerVariables.addToInventory("Green Seed");
         importBot();
     }
 }
Exemplo n.º 3
0
        public void AddPlayerVariable()
        {
            var ret = new GlobalVariableItemModel(PlayerVariables);

            PlayerVariables.Add(ret);
            PlayerVariables.SelectedItem = ret;
        }
Exemplo n.º 4
0
	void Start () 
	{
		objectVar = GetComponent<ObjectVariables>();
		growlingGoat = GetComponent<AIGrowlingGoat>();
		playerVar = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerVariables>();
		collider = GetComponent<Collider2D>();
	}
Exemplo n.º 5
0
    void Start()
    {
        player      = gameObject.transform.root.gameObject;
        dataHandler = player.GetComponent <DataHandler>();
        if (dataHandler.playerData.rewardsPurchased.Contains(5))
        {
            EnableAutoAim();
        }
        anim2 = this.gameObject.GetComponent <Animator>();
        //    anim["Draw"].wrapMode = WrapMode.Once;
        //   anim["Draw"].speed = 1f;
        audioSource  = gameObject.GetComponent <AudioSource>();
        itemHandler  = gameObject.GetComponent <ItemHandler>();
        maxBowPower  = itemHandler.maxDrawPower;
        weaponDamage = itemHandler.effectInt;
        ammoCount    = itemHandler.amount;

        LoadArrow();
        weaponHudText      = GameObject.Find("WeaponHUD").GetComponentInChildren <Text>();
        weaponHudText.text = ammoCount.ToString();
        inventory          = gameObject.transform.root.GetComponentInChildren <Backpack>(true);
        inSlot             = itemHandler.inSlot;
        playerVariables    = player.GetComponent <PlayerVariables>();
        mainCamera         = Camera.main.gameObject;
    }
Exemplo n.º 6
0
	void Start () {
        player = GameObject.FindGameObjectWithTag("Player");
        var_Player = player.GetComponent<PlayerVariables>();
        sprite_dialog = obj_dialog.GetComponent<SpriteRenderer>();
        aud = GetComponent<AudioSource>();
        var = GetComponent<ObjectVariables>();
	}	
Exemplo n.º 7
0
        protected virtual void SerializeImpl(IO.BitStream s)
        {
            var condition_write_order = s.IsWriting ? mCompilerState.ConditionWriteOrder : null;
            var action_write_order    = s.IsWriting ? mCompilerState.ActionWriteOrder : null;
            var trigger_write_order   = s.IsWriting ? mCompilerState.TriggerWriteOrder : null;

            Collections.ActiveListUtil.Serialize(s, Conditions, Database.Limits.Conditions.CountBitLength,
                                                 this, NewConditionFromBitStream, condition_write_order);
            Collections.ActiveListUtil.Serialize(s, Actions, Database.Limits.Actions.CountBitLength,
                                                 this, NewActionFromBitStream, action_write_order);
            Collections.ActiveListUtil.Serialize(s, Triggers, Database.Limits.Triggers.CountBitLength,
                                                 this, NewTriggerFromBitStream, trigger_write_order);
            s.StreamElements(GameStatistics, Database.Limits.GameStatistics.CountBitLength, this, _model => _model.NewGameStatistic());
            GlobalVariables.Serialize(this, s);
            PlayerVariables.Serialize(this, s);
            ObjectVariables.Serialize(this, s);
            TeamVariables.Serialize(this, s);
            s.StreamElements(HudWidgets, Database.Limits.HudWidgets.CountBitLength);
            SerializeTriggerEntryPoints(s);
            ObjectTypeReferences.SerializeWords(s, Shell.EndianFormat.Little);
            s.StreamElements(ObjectFilters, Database.Limits.ObjectFilters.CountBitLength);
            if (Database.Limits.SupportsGameObjectFilters)
            {
                SerializeGameObjectFilters(s);
            }
        }
Exemplo n.º 8
0
    // Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        this._playerVariables = GetNode <PlayerVariables>("/root/PlayerVariables");
        this._scoreLabel      = GetNode <Label>("ScoreLabel");

        this._scoreLabel.Text = this._playerVariables.Score.ToString().PadLeft(this.ScoreLength, '0');
    }
Exemplo n.º 9
0
 public bool runPowerUp(GameObject player)
 {
     _pVar = player.GetComponent <PlayerVariables>();
     _pVar._baseMaxSpeed = _pVar._baseMaxSpeed * 1.5f;
     _pVar._normalSpeed  = _pVar._normalSpeed * 2f;
     return(true);
 }
Exemplo n.º 10
0
	// Use this for initialization
	void Start () {
        var = GetComponent<ObjectVariables>();
        audioManager = GameObject.FindGameObjectWithTag("GLOBAL_audio");
        aud = audioManager.GetComponent<AudioSource>();
        player = GameObject.FindGameObjectWithTag("Player");
        var_player = player.GetComponent<PlayerVariables>();
	}
Exemplo n.º 11
0
 private void Start()
 {
     voice         = new SpVoice();
     input         = GetComponent <TMP_InputField>();
     player        = GameObject.Find("Player").GetComponent <PlayerVariables>();
     pm            = player.GetComponent <PlayerMovement>();
     input.enabled = false;
 }
Exemplo n.º 12
0
 private void Start()
 {
     playerVariables      = player.GetComponent <PlayerVariables>();
     xpPopupText          = xpPopup.GetComponent <TextMeshProUGUI>();
     xpPopupRectTransform = xpPopup.GetComponent <RectTransform>();
     xpPopupOriginalPos   = xpPopupRectTransform.localPosition;
     audioSource          = xpPopup.GetComponent <AudioSource>();
 }
Exemplo n.º 13
0
	void Start ()
    {
        playerVar = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerVariables>();
		goat = transform.GetChild(0).gameObject.GetComponent<GoatAnimator>();
		goatObject = transform.GetChild(1).gameObject.GetComponent<ObjectVariables>();
		benchArray = GameObject.FindGameObjectsWithTag("OBJECT_bench");
		timeUntilCanAttack = Random.Range(2, 5);
	}
Exemplo n.º 14
0
 // Update is called once per frame
 private void Update()
 {
     if (this.photonView.ownerId != assignedColorForUserId)
     {
         m_Renderer.material         = PlayerVariables.GetMaterial(m_Renderer.material, this.photonView.ownerId);
         this.assignedColorForUserId = this.photonView.ownerId;
         //Debug.Log("Switched Material to: " + this.assignedColorForUserId + " " + this.renderer.material.GetInstanceID());
     }
 }
Exemplo n.º 15
0
    public override void _Ready()
    {
        this._scoreLabel = GetNode <Label>("Score");
        this._healthBar  = GetNode <HealthBar>("HealthBar");

        this._healthBar.SetValue(1);

        this._playerVariables = GetNode <PlayerVariables>("/root/PlayerVariables");
    }
Exemplo n.º 16
0
 void Start()
 {
     _lockTransform = deathCanvas.transform.rotation;
     _pVar          = GetComponent <PlayerVariables>();
     _phy           = GetComponent <CustomPhysics>();
     _normalState   = new NormalState(_pVar);
     _boostState    = new BoostState(_pVar);
     _currentState  = _normalState;
     _image         = deathCanvas.GetComponentInChildren <Image>();
 }
Exemplo n.º 17
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.gameObject.GetComponent <isHoldable>() == true && robotMoveScript.isGrabbing == false)
     {
         PlayerVariables.sendMessage("System", "Item detected.");
         AudioSource.PlayClipAtPoint(collectSound, Vector3.zero);
         collision.gameObject.SetActive(false);
         PlayerVariables.addToInventory(collision.gameObject.GetComponent <itemIdentifier>().name);
     }
 }
Exemplo n.º 18
0
 private void Start()
 {
     _pVar            = gameObject.GetComponent <PlayerVariables>();
     _rb              = gameObject.GetComponent <Rigidbody>();
     _rb.position     = transform.position;
     _rb.rotation     = transform.rotation;
     _rb.centerOfMass = Vector3.zero;
     dead             = false;
     StartCoroutine(GetComponent <RoombaVFX>().checkForRunVFX(_rb));
 }
Exemplo n.º 19
0
 public void GetDirtSample()
 {
     if (PlayerVariables.findInInventory("Dirt Checker") != null)
     {
         StartCoroutine(CheckingDirt());
     }
     else
     {
         PlayerVariables.sendMessage("System", "Inventory does not include a dirt checker!");
     }
 }
Exemplo n.º 20
0
 IEnumerator CheckingDirt()
 {
     for (byte i = 0; i < 4; i++)
     {
         PlayerVariables.sendMessage("System", "Checking...");
         yield return(new WaitForSeconds(Random.Range(.3f, 1.2f)));
     }
     PlayerVariables.sendMessage("System", "[COMPLETE] Contamination Level: " + PlayerVariables.atmosphereContamination + "%");
     PlayerVariables.addTaskProgress("testSoil1", 1);
     isGrabbing = false;
 }
Exemplo n.º 21
0
    void SaveVariablesToGDS()
    {
        //Mostly stuff on the player
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (player != null)
        {
            PlayerVariables pv = player.GetComponent <PlayerVariables>();
            //gds.SDS.PlayerInfo.Current_Position = player.transform.position;
            //gds.SDS.PlayerInfo.Current_Rotation = player.transform.eulerAngles;
        }
    }
Exemplo n.º 22
0
    public override void InitiatePickup()
    {
        PlayerVariables.HeldKey = addedKey;
        string KeyText = PlayerVariables.GetKeyName(addedKey);

        if (attachedLight)
        {
            StartCoroutine(FadeLight());
        }

        StartCoroutine(PlayerVariables.ShowText(KeyText + " key acquired!", 5f - 2 * PlayerVariables.UITextAnimation.length));
    }
Exemplo n.º 23
0
    private void PopulatePanel()
    {
        //print("Debug Log: " + taskList[1].progress);
        Dictionary <string, int> itemizedInv = new Dictionary <string, int>();

        foreach (string item in PlayerVariables.inventory)
        {
            if (Item.GetItemPrefab(item) != null)
            {
                if (!itemizedInv.ContainsKey(item))
                {
                    itemizedInv.Add(item, 1);
                }
                else
                {
                    itemizedInv[item]++;
                }
            }
        }
        foreach (KeyValuePair <string, int> pair in itemizedInv)
        {
            string itemName   = pair.Key;
            int    itemAmount = pair.Value;
            string textLabel  = itemName;
            if (itemAmount > 1)
            {
                textLabel += " (" + itemAmount + ")";
            }
            GameObject itemUI = Instantiate(prefab, gameObject.GetComponent <Transform>());
            itemUI.GetComponent <Transform>().Find("Text").GetComponent <Text>().text = textLabel;
            Button btn = itemUI.GetComponent <Button>();
            btn.onClick.AddListener(() => {
                string removed = PlayerVariables.removeFromInventory(itemName);
                if (removed != null)
                {
                    if (robotMoveScript.isGrabbing == false)
                    {
                        string newStr                    = itemName.Replace(" ", "");
                        GameObject pfClone               = Instantiate(Resources.Load("Items/" + newStr) as GameObject);
                        robotMoveScript.isGrabbing       = true;
                        robotMoveScript.chosenGameObject = pfClone;
                        GameObject.Find("PickupRobot").GetComponent <canHoldItem>().pickUp(pfClone);
                        gameObject.transform.parent.gameObject.SetActive(false);
                    }
                    else
                    {
                        PlayerVariables.sendMessage("Robot:", "Already have something in hand!");
                    }
                }
            });
        }
    }
Exemplo n.º 24
0
	void Start () {
        //Dependancy "GridManager"
        gridManagerObject = GameObject.FindGameObjectWithTag("GridManager");
        gridManager = gridManagerObject.GetComponent<GridManager>();
        //Dependancy "GridVariables", "PlayerVariables"
        gridVar = GetComponent<GridVariables>();
        playerVar = GetComponent<PlayerVariables>();
        //Dependancy "GridLayer"
        gridLayer = GetComponent<GridLayer>();

        //Set position of object based on current layer
        transform.position = new Vector3(transform.position.x, gridVar.gridLayer * gridManager.tileSize);
	}
Exemplo n.º 25
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance  = this;
         timerText = timerObject.GetComponent <Text>();
     }
     Instantiate(playerPrefab, checkpoint, Quaternion.identity);
 }
Exemplo n.º 26
0
        public override void Entry(IModHelper helper)
        {
            //string first=StardewModdingAPI.Program.StardewAssembly.Location;
            string first = StardewModdingAPI.Constants.ExecutionPath;

            contentPath = first.Remove(first.Length - 19, 19);
            StardewModdingAPI.Events.ControlEvents.KeyPressed   += ShopCall;
            StardewModdingAPI.Events.ControlEvents.MouseChanged += ControlEvents_MouseChanged;
            StardewModdingAPI.Events.GameEvents.UpdateTick      += gameMenuCall;
            //  StardewModdingAPI.Events.GameEvents.UpdateTick += BedCleanUpCheck;
            StardewModdingAPI.Events.GameEvents.GameLoaded        += GameEvents_GameLoaded;
            StardewModdingAPI.Events.GameEvents.OneSecondTick     += MapWipe;
            StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += Util.ResetAllDailyBooleans;
            StardewModdingAPI.Events.SaveEvents.AfterLoad         += SaveEvents_AfterLoad;

            StardewModdingAPI.Events.SaveEvents.BeforeSave += SaveEvents_BeforeSave;
            StardewModdingAPI.Events.SaveEvents.AfterSave  += SaveEvents_AfterSave;
            StardewModdingAPI.Events.SaveEvents.AfterLoad  += SaveEvents_AfterSave;

            StardewModdingAPI.Events.GameEvents.UpdateTick += GameEvents_UpdateTick;

            StardewModdingAPI.Events.GraphicsEvents.OnPreRenderHudEvent += GraphicsEvents_OnPreRenderHudEvent;

            StardewModdingAPI.Events.GraphicsEvents.OnPostRenderHudEvent += draw;



            //StardewModdingAPI.Events.TimeEvents.DayOfMonthChanged += Util.WaterAllCropsInAllLocations;
            hasLoadedTerrainList = false;
            path   = Helper.DirectoryPath;
            newLoc = new List <GameLoc>();


            PlayerVariables.initializePlayerVariables();
            Log.AsyncG("Revitalize: Running on API Version: " + StardewModdingAPI.Constants.ApiVersion);

            useMenuFocus = true;
            Lists.loadAllListsAtEntry();

            if (File.Exists(Path.Combine(path, "xnb_node.cmd")))
            {
                paintEnabled = true;
                Log.AsyncG("Revitalize: Paint Module Enabled");
            }
            else
            {
                paintEnabled = false;
                Log.AsyncG("Revitalize: Paint Module Disabled");
            }
        }
Exemplo n.º 27
0
    void Update()
    {
        PlayerVariables playerVariables = GetComponent <PlayerVariables>();

        timeLeft -= Time.deltaTime;
        timeLeftUI.gameObject.GetComponent <Text>().text    = ("" + (int)timeLeft);
        playerScoreUI.gameObject.GetComponent <Text>().text = ("" + playerScore);
        if (timeLeft < 0.1f)
        {
            playerVariables.Respawn();
            timeLeft    = 180;
            playerScore = 0;
        }
    }
Exemplo n.º 28
0
    // Start is called before the first frame update
    void Start()
    {
        playerScripts = GameObject.FindGameObjectWithTag("Player").GetComponents <MonoBehaviour>();
        foreach (MonoBehaviour mono in playerScripts)
        {
            if (mono.GetType() == typeof(DashScript))
            {
                if (canDash == false)
                {
                    mono.enabled = false;
                }
            }
            else if (mono.GetType() == typeof(SlideScript))
            {
                if (canSlide == false)
                {
                    mono.enabled = false;
                }
            }

            else if (mono.GetType() == typeof(WallrunningScript))
            {
                if (canWallrun == false)
                {
                    mono.enabled = false;
                }
            }

            else if (mono.GetType() == typeof(WallclimbingScript))
            {
                if (canClimb == false)
                {
                    mono.enabled = false;
                }
            }
            else if (mono.GetType() == typeof(JumpScript))
            {
                if (canJump == false)
                {
                    mono.enabled = false;
                }
            }
        }

        UITextAnimator = UIText.GetComponent <Animator>();
        textComp       = UIText.GetComponent <TextMeshProUGUI>();

        //StartCoroutine(TutorialText());
        StartCoroutine(PlayerVariables.ShowText(InitialTut, hideTextAfter));
    }
Exemplo n.º 29
0
    void Start ()
	{
        //Dependency "PlayerVariables", "GridVariables"
		playerVar = GetComponent<PlayerVariables> ();
        gridVar = GetComponent<GridVariables>();

        //Dependency "Player Sprite"
        playerAnimation = playerSprite.GetComponent<JensAnimationController>();
        playerSize = playerSprite.GetComponent<SpriteSize>();

        audioManager = GetComponent<AudioManager>();

        aud = GetComponent<AudioSource>();
        playerCollider = GetComponent<Collider2D>();
	}
Exemplo n.º 30
0
 private bool currentTasksCompleted(List <string> taskSet)
 {
     foreach (string taskName in taskSet)
     {
         Task task = PlayerVariables.getTaskByName(taskName);
         if (task != null)
         {
             if (task.progress < task.steps)
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Exemplo n.º 31
0
 public void PlantWorldSeed()
 {
     if (itemSlot.GetChild(0).gameObject != null)
     {
         if (itemSlot.GetChild(0).gameObject.GetComponent <worldSeedPlantScript>())
         {
             if (itemSlot.transform.GetChild(0).gameObject.GetComponent <itemIdentifier>().name == "Strong Purple Seed")
             {
                 Vector3 savePos = itemSlot.transform.GetChild(0).position;
                 Destroy(itemSlot.transform.GetChild(0).gameObject);
                 robotMoveScript.chosenGameObject = null;
                 robotMoveScript.isGrabbing       = false;
                 GameObject.Instantiate(Resources.Load("Plants/purple0") as GameObject, savePos + (0.3f * Vector3.down), Quaternion.Euler(0, 0, 0));
             }
             if (itemSlot.transform.GetChild(0).gameObject.GetComponent <itemIdentifier>().name == "Red Seed")
             {
                 Vector3 savePos = itemSlot.transform.GetChild(0).position;
                 Destroy(itemSlot.transform.GetChild(0).gameObject);
                 robotMoveScript.chosenGameObject = null;
                 robotMoveScript.isGrabbing       = false;
                 if (Random.Range(0, 2) == 0)
                 {
                     GameObject.Instantiate(Resources.Load("Plants/tendril0") as GameObject, savePos + (0.3f * Vector3.down), Quaternion.Euler(0, 0, 0));
                 }
                 else
                 {
                     GameObject.Instantiate(Resources.Load("Plants/snake0") as GameObject, savePos + (0.3f * Vector3.down), Quaternion.Euler(0, 0, 0));
                 }
             }
             if (itemSlot.transform.GetChild(0).gameObject.GetComponent <itemIdentifier>().name == "Grass Seed")
             {
                 Vector3 savePos = itemSlot.transform.GetChild(0).position;
                 Destroy(itemSlot.transform.GetChild(0).gameObject);
                 robotMoveScript.chosenGameObject = null;
                 robotMoveScript.isGrabbing       = false;
                 GameObject.Instantiate(Resources.Load("Plants/grass0") as GameObject, savePos + (0.3f * Vector3.down), Quaternion.Euler(0, 0, 0));
             }
         }
         else
         {
             PlayerVariables.sendMessage("Robot:", "Not currently holding an outdoor plantable seed");
         }
     }
     else
     {
         PlayerVariables.sendMessage("Robot:", "No seed in hand");
     }
 }
Exemplo n.º 32
0
    // Update is called once per frame

    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (robotMoveScript.isMovingToPosition == true)
        {
            if (robotMoveScript.isGrabbing == false)
            {
                robotMoveScript.chosenGameObject  = gameObject;
                robotMoveScript.isSeekingPosition = false;
            }
            else
            {
                PlayerVariables.sendMessage("System", "Already grabbing something!");
                robotMoveScript.isMovingToPosition = false;
            }
        }
    }
Exemplo n.º 33
0
    public override void InitiatePickup()
    {
        if (Wallclimb)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <WallclimbingScript>().enabled = true;
        }

        else if (Slide)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <SlideScript>().enabled = true;
        }

        else if (Dash)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <DashScript>().enabled = true;
        }

        else if (Wallrun)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <WallrunningScript>().enabled = true;
        }

        else if (Jump)
        {
            GameObject.FindGameObjectWithTag("Player").GetComponent <JumpScript>().enabled = true;
        }


        // Rotating the whole gameobject to face the player
        gameObject.transform.rotation = Quaternion.LookRotation(-GameObject.FindGameObjectWithTag("Player").transform.right);

        SimpleRotateFloatScript SRS = GetComponentInChildren <SimpleRotateFloatScript>();

        if (SRS)
        {
            SRS.enabled = false;
        }
        PickupName.enabled = false;


        StartCoroutine(PlayerVariables.ShowText(Desc, destroyDelay - 2 * PlayerVariables.UITextAnimation.length));;

        if (attachedLight)
        {
            StartCoroutine(FadeLight());
        }
    }
Exemplo n.º 34
0
        public static void DuringEntry()
        {
            Class1.hasLoadedTerrainList = false;

            Class1.path   = Class1.modHelper.DirectoryPath;
            Class1.newLoc = new List <GameLoc>();


            PlayerVariables.initializePlayerVariables();
            //Log.AsyncG("Revitalize: Running on API Version: " + StardewModdingAPI.Constants.ApiVersion);

            Lists.loadAllListsAtEntry();

            Settings.SettingsManager.Initialize();
            Settings.SettingsManager.LoadAllSettings();
            Settings.SettingsManager.SaveAllSettings();
        }
Exemplo n.º 35
0
    // Start is called before the first frame update

    void Awake()
    {
        shipBody   = gameObject.GetComponent <Rigidbody2D>();
        playerVars = gameObject.GetComponent <PlayerVariables>();
        if (photonView.IsMine)
        {
            //Player is local
        }
        else
        {
            //Player is Remote, deactivate the scripts and object that should only be enabled for the local player
            for (int i = 0; i < localScripts.Length; i++)
            {
                localScripts[i].enabled = false;
            }
        }
    }
Exemplo n.º 36
0
    // Use this for initialization
    void Start()
    {
        cachedY               = healthTransform.position.y;
        minXvalue             = 0;
        maxXvalue             = healthTransform.localScale.x;
        currentHealth         = (int)maxHealth;
        onCD                  = false;
        playerVar             = GetComponent <PlayerVariables>();
        source                = GetComponent <AudioSource>();
        cdTimerIsActive       = false;
        doubleJumpCDText.text = "J";
        burgerText.text       = "X " + PlayerVariables.burgerCount;
        burgerEaten           = false;

        //    healthTransform
        //   healthText
        //   visualHealth = GameObject.Find("Health").GetComponent<Image>;
    }
Exemplo n.º 37
0
 // Use this for initialization
 void Start()
 {
     playerV = gameObject.GetComponent<PlayerVariables>();
     health = MAXHEALTH;
     anim = GetComponent<Animator>();
 }
Exemplo n.º 38
0
	void Start ()
    {
        var = GetComponent<ObjectVariables>();
        player = GameObject.FindGameObjectWithTag("Player");
        var_player = player.GetComponent<PlayerVariables>();
	}