Example #1
0
    public override void Start()
    {
        GameObject Temp_go = GetLinkedObject("enemies_manager");

        if (Temp_go == null)
        {
            Debug.Log("[error] Gameobject enemies_manager not found");
        }
        else
        {
            EnemiesManager enemy_manager = Temp_go.GetComponent <EnemiesManager>();

            if (enemy_manager == null)
            {
                Debug.Log("[error] EnemySword_BT: enemies_manager is not detected");
            }
            else
            {
                enemy_manager.AddSwordEnemy(gameObject);
            }
        }

        if (texture_type == 0)
        {
            enemy_mat_sword = GetMaterialByName("Alpha1_SwordEnemy_Material_21_04");
        }
        else if (texture_type == 1)
        {
            enemy_mat_sword = GetMaterialByName("Alpha1_SwordEnemy2_Material_21_04");
        }

        sword_name = GetLinkedObject("sword_name");

        dmg_alpha = 0.0f;

        hp_limiter = total_hp * (berserk_mode_percentage * 0.01f);
        Debug.Log("Hp limiter : " + hp_limiter, Department.STAGE, Color.PINK);

        base.Start();
        base.DeactivateHUD(sword_name);
    }