Esempio n. 1
0
    // Start is called before the first frame update
    public override void Start()
    {
        base.Start();

        mMinimapRawImage = CinematicId.FindObjectWithId("minimap_image");
        mTimer           = Random.Range(5f, 10f);
    }
Esempio n. 2
0
    public void MakeShopKeeperEnemy()
    {
        GameObject shopKeep = CinematicId.FindObjectWithId("shopkeep");

        if (shopKeep == null)
        {
            return;
        }

        shopKeep.GetComponent <Enemy>().enabled         = true;
        shopKeep.GetComponent <Killable>().enabled      = true;
        shopKeep.GetComponent <Killable>().invulnerable = false;
        shopKeep.GetComponent <EnemyMelee>().enabled    = true;
        shopKeep.GetComponent <SimpleAttack>().enabled  = true;
        shopKeep.layer = LayerMask.NameToLayer("Enemy");
        shopKeep.GetComponentInChildren <CharacterModel>().gameObject.layer = LayerMask.NameToLayer("Enemy");

        // Disable all the activation plates that are pointing at the now hostile shopkeeper
        ActivationPlate[] plates = GameObject.FindObjectsOfType <ActivationPlate>();
        for (int i = 0; i < plates.Length; ++i)
        {
            if (plates[i].link == shopKeep)
            {
                plates[i].gameObject.SetActive(false);
            }
        }

        isShopKeeperEnemy = true;
    }
    public override IEnumerator PlayInternal(CinematicDirector player)
    {
        GameObject vfx = PrefabManager.instance.InstantiatePrefabByName("CFX3_Hit_SmokePuff");

        GameObject character = CinematicId.FindObjectWithId(mNPCName);

        if (character == null)
        {
            Debug.LogError("Couldn't find character: " + mNPCName);
        }

        vfx.transform.position = character.transform.position;

        GameObject.Destroy(character.gameObject);

        yield break;
    }