Exemplo n.º 1
0
 void InstantiatePlayer()
 {
     if (BlockQueue.Count != 0)
     {
         //Instatiate Player
         currPlayer = Instantiate(BlockQueue.Peek(), playerSpawn.transform);
         //Set movement script to curr player
         playerMovementScript.UpdateCurrentPlayer(currPlayer);
         //Set zone check script
         playerZoneCheckScript = currPlayer.GetComponent <ZoneCheck>();
         //Reset spawn timer
         spawnTimer = spawnTimeSeconds;
         //Reset spawn bool
         spawnNewPlayer = false;
         //Set color to player color
         currPlayer.GetComponent <SpriteRenderer>().color = playerColor;
         //Set sprite to player sprite
         currPlayer.GetComponent <SpriteRenderer>().sprite = playerSprite;
         //Update Block Queue UI
         EventParam eventParam = new EventParam();
         Managers.EventManager.TriggerEvent("UpdateBlockQueue", eventParam);
     }
     else
     {
         //Reset Level
         EventParam eventParam = new EventParam();
         Managers.EventManager.TriggerEvent("ResetLevel", eventParam);
     }
 }
    void Awake()
    {
        // find the script and allow me to check for collision
        //zone = GameObject.Find("InteractionZone").GetComponent<ZoneCheck>();
        zone            = gameObject.transform.GetChild(0).GetComponent <ZoneCheck>();
        playerAttention = false;
        isMatched       = false;
        inMatchList     = false;

        if (likesPudding)
        {
            attribute += "Likes Pudding";
        }
        else
        {
            attribute += "Hates Pudding";
        }

        if (likesVideoGames)
        {
            attribute += ", Likes Video Games";
        }
        else
        {
            attribute += ", Hates Video Games";
        }

        convo = new ConversationPoint("Hey! I'm " + name + "!\nHere's some facts about me:\n" + attribute,
                                      new ResponseTree {
            { "Cool story bro", new ConversationPoint("Press F to add me to the match list!") }
        }
                                      );

        convoManager = GameObject.Find("Conversation Manager").GetComponent <ConversationManager>();
    }
Exemplo n.º 3
0
 void OnTriggerEnter(Collider zone)
 {
     if (zone.tag == "zone")
     {
         ZoneCheck zc = zone.GetComponent <ZoneCheck>();
         zc.CounterUp();
     }
 }
Exemplo n.º 4
0
 public void HandleTheThing(Character cawactews, ZoneCheck imInTheZone)
 {
     // DO THINGS
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     // find the script and allow me to check for collision
     zone = GameObject.Find("InteractionZone").GetComponent <ZoneCheck>();
 }