Exemple #1
0
    void Awake()
    {
        // Alias references
        Instance = this;
        playerObject = transform.parent.gameObject;
        handTarget = playerObject.transform.FindChild("PlayerModel").FindChild("female_bones").FindChild("handcontrol_right").FindChild("penanced_hand").transform;

        // Default attributes
        flyAccel = 75.0f;
        throwAccel = 40.0f;
        maxAccel = 1000.0f;
        recallAccel = 2000.0f;
        regDrag = 1.0f;
        catchRadius = 0.3f;
        maxDist = 10.0f;
        held = true;
        recall = false;
        gripped = false;

        // Align penance with handTarget
        snapToHand();

        // Make sure the only physics affecting the penance comes from this script
        rigidbody.freezeRotation = true;
        rigidbody.useGravity = false;
    }
Exemple #2
0
    // Use this for initialization
    void Awake()
    {
        Instance = this;
        maxHealth = 100;
        curHealth = 100;
        state = 0.5f;
        alive = true;
        rangeDmg = 10;
        meleeDmg = 10;
        TimeToAngel = 8.0f;
        stateTimer = TimeToAngel;
        healthBarLength = Screen.width / 2;
        stateBarLength = healthBarLength;
        penance = PenanceMotion.Instance;

        healthTextures = Resources.LoadAll("Textures/fireoverlay", (typeof(Texture)));
        nextText = false;
        textureIndex = 0;
        numTextures = 90;
    }