Example #1
0
    protected void StopCharm()
    {
        // get protocols
        MonsterProtocols proto = characterData.getProtocol();
        MonsterChecks    check = characterData.getChecks();

        // no leader
        check.ResetSpecials();
        check.specialLeader = null;
        check.congaPosition = -1;
        // remove self from player's party
        PlayerController.instance.GetComponent <PlayerData>().party.Remove(gameObject);
        // initiate conga
        characterData.currentProtocol = AIData.Protocols.Lazy;

        Debug.Log("no longer CHARMED");
    }
    private void Start()
    {
        #region Initialize Components
        Behavior = GetComponent <MonsterBehavior>();
        Protocol = GetComponent <MonsterProtocols>();
        Checks   = GetComponent <MonsterChecks>();
        Curves   = GetComponent <UtilityCurves>();
        #endregion
        #region Initialize Data
        InitializeCharacterData();
        InitializeNormalValues();
        #endregion
        path = new List <TileNode>();

        _vectors = new Dictionary <string, Vector2> {
            { "Player", new Vector2(0f, 0f) }
        };
    }
Example #3
0
    protected void StartCharm(float time)
    {
        // get protocols

        //Debug.Log("should be CHARMED for " + time + " seconds");
        MonsterProtocols proto = characterData.getProtocol();
        MonsterChecks    check = characterData.getChecks();

        // initiate conga
        characterData.currentProtocol = AIData.Protocols.Conga;

        if (characterData.path != null)
        {
            characterData.path.Clear();
        }
        // set leader to Soma
        check.specialLeader = PlayerController.instance.gameObject;
        // add self to player's party
        PlayerController.instance.GetComponent <PlayerData>().party.Add(gameObject);
        // get ready to stop it
        StartCoroutine(ExecuteCharm(time));
    }